OptimusCheckbox constructor

const OptimusCheckbox({
  1. Key? key,
  2. required Widget label,
  3. bool? isChecked = false,
  4. String? error,
  5. bool isEnabled = true,
  6. OptimusCheckboxSize size = OptimusCheckboxSize.large,
  7. bool tristate = false,
  8. required ValueChanged<bool> onChanged,
})

Implementation

const OptimusCheckbox({
  super.key,
  required this.label,
  this.isChecked = false,
  this.error,
  this.isEnabled = true,
  this.size = OptimusCheckboxSize.large,
  this.tristate = false,
  required this.onChanged,
}) : assert(
        tristate || isChecked != null,
        'isChecked must be set if tristate is false',
      );