ArnaCheckboxListTile constructor

const ArnaCheckboxListTile({
  1. Key? key,
  2. required bool? value,
  3. required ValueChanged<bool?>? onChanged,
  4. required String title,
  5. String? subtitle,
  6. Widget? trailing,
  7. bool tristate = false,
  8. bool isFocusable = true,
  9. bool autofocus = false,
  10. Color? accentColor,
  11. EdgeInsetsGeometry? padding,
  12. double leadingToTitle = Styles.largePadding,
  13. bool enabled = true,
  14. MouseCursor cursor = MouseCursor.defer,
  15. String? semanticLabel,
})

Creates a combination of a list tile and a checkbox.

The checkbox tile itself does not maintain any state. Instead, when the state of the checkbox changes, the widget calls the onChanged callback. Most widgets that use a checkbox will listen for the onChanged callback and rebuild the checkbox tile with a new value to update the visual appearance of the checkbox.

The following arguments are required:

  • value, which determines whether the checkbox is checked. The value can only be null if tristate is true.
  • onChanged, which is called when the value of the checkbox should change. It can be set to null to disable the checkbox.

The value of tristate must not be null.

Implementation

const ArnaCheckboxListTile({
  super.key,
  required this.value,
  required this.onChanged,
  required this.title,
  this.subtitle,
  this.trailing,
  this.tristate = false,
  this.isFocusable = true,
  this.autofocus = false,
  this.accentColor,
  this.padding,
  this.leadingToTitle = Styles.largePadding,
  this.enabled = true,
  this.cursor = MouseCursor.defer,
  this.semanticLabel,
});