Checkbox constructor

const Checkbox({
  1. required String label,
  2. AnsiColorType? selectionColor,
  3. AnsiColorType? hoverColor,
  4. AnsiColorType? textColor,
  5. int width = 0,
})

Creates a Checkbox with the given label and optional styling.

  • label is required and will always be displayed.
  • selectionColor sets the background color when checked.
  • hoverColor sets the background color when hovered but unchecked.
  • textColor sets the label text color.
  • width adds extra spacing after the label.

Implementation

const Checkbox({
  required this.label,
  this.selectionColor,
  this.hoverColor,
  this.textColor,
  this.width = 0,
});