MenuCheckbox constructor

const MenuCheckbox({
  1. Key? key,
  2. bool value = false,
  3. ContextedValueChanged<bool>? onChanged,
  4. required Widget child,
  5. Widget? trailing,
  6. bool enabled = true,
  7. bool autoClose = true,
})

Creates a checkbox menu item.

Parameters:

  • value (bool): Current checked state, defaults to false
  • onChanged (ContextedValueChanged<bool>?): State change callback
  • child (Widget, required): Display content
  • trailing (Widget?): Optional trailing widget
  • enabled (bool): Whether enabled, defaults to true
  • autoClose (bool): Whether to auto-close menu, defaults to true

Implementation

const MenuCheckbox({
  super.key,
  this.value = false,
  this.onChanged,
  required this.child,
  this.trailing,
  this.enabled = true,
  this.autoClose = true,
});