title: Flutter uncheck Checkbox if other checkbox is checked
body: <p>I have a Flutter code where I want to have all the other checkboxes unchecked if a checkbox is checked. I don't want to use radio buttons. How can I do that?
  I also don't know how I can access the bool of the other Widgets when I am in a Widget (e.g. in OptionOneCheckbox, how can I access the bool isChecked in the OptionTwoCheckbox/OptionThreeCheckbox Widget?).</p>
  
  <p>This is the code so far:</p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  class OptionOneCheckbox extends StatefulWidget {
    @override
    _OptionOneCheckboxState createState() =&gt; _OptionOneCheckboxState();
  }
  
  class _OptionOneCheckboxState extends State&lt;OptionOneCheckbox&gt; {
    bool isChecked = false;
    @override
    Widget build(BuildContext context) {
      return Checkbox(
        checkColor: Colors.white,
          activeColor: Colors.black,
        value: isChecked,
        onChanged: (value) {
          setState(() {
            isChecked = value;
          });
        },
      );
    }
  }
  
  class OptionTwoCheckbox extends StatefulWidget {
    @override
    _OptionTwoCheckboxState createState() =&gt; _OptionTwoCheckboxState();
  }
  
  class _OptionTwoCheckboxState extends State&lt;OptionTwoCheckbox&gt; {
    bool isChecked = false;
    @override
    Widget build(BuildContext context) {
      return Checkbox(
          checkColor: Colors.white,
          activeColor: Colors.black,
          value: isChecked,
          onChanged: (value) {
            setState(() {
              isChecked = value;
            });
          });
    }
  }
  
  class OptionThreeCheckbox extends StatefulWidget {
    @override
    _OptionThreeCheckboxState createState() =&gt; _OptionThreeCheckboxState();
  }
  
  class _OptionThreeCheckboxState extends State&lt;OptionThreeCheckbox&gt; {
    bool isChecked = false;
    @override
    Widget build(BuildContext context) {
      return Checkbox(
          checkColor: Colors.white,
          activeColor: Colors.black,
          value: isChecked,
          onChanged: (value) {
            setState(() {
              isChecked = value;
            });
          });
    }
  }
  </code></pre>