Checkbox constructor

const Checkbox({
  1. Key? key,
  2. bool? value,
  3. bool tristate = false,
  4. ValueChanged<bool?>? onChanged,
  5. FocusNode? focusNode,
  6. bool autofocus = false,
  7. CheckboxThemeData? theme,
  8. bool forceEnabled = false,
})

Creates a Checkbox.

Implementation

const Checkbox({
  super.key,
  this.value,
  this.tristate = false,
  this.onChanged,
  this.focusNode,
  this.autofocus = false,
  this.theme,
  this.forceEnabled = false,
})  : assert(tristate || value != null),
      assert(!forceEnabled || onChanged == null,
          'Cannot have `onChanged` when `forceEnabled` is true');