title: How to pass a value bool? in a switch in flutter
body: <p>I am making a form with switches in Flutter and I would like to save the value of it, but Flutter doesn't want a value bool? so I don't know how to get my value.</p>
  <p>Here is my code :</p>
  <pre><code>Switch(
     value: _editedProduct.myswitchvalue, //line that causes problem
     onChanged: (bool val) =&gt;
        setState(() {
           _editedProduct = _editedProduct.copyWith(myswitchvalue: val);
       },
     ),
  ),
  </code></pre>
  <p>And here's the message of my error</p>
  <pre><code>The argument type 'bool?' can't be assigned to the parameter type 'bool'.dart(argument_type_not_assignable)
  FormProductModel _editedProduct
  </code></pre>
  <p>Thank you for reading me</p>