checkboxHighlighted method

String checkboxHighlighted(
  1. bool checked, {
  2. bool highlight = false,
})

Returns a highlighted checkbox (for focused items).

Wraps the checkbox with inverse styling when highlight is true and the theme supports inverse highlighting.

Implementation

String checkboxHighlighted(bool checked, {bool highlight = false}) {
  final base = checkbox(checked);
  if (highlight && features.useInverseHighlight) {
    return '${theme.inverse}$base${theme.reset}';
  }
  return base;
}