ArnaColorButton<T> constructor

const ArnaColorButton<T>({
  1. Key? key,
  2. required T value,
  3. required T? groupValue,
  4. required VoidCallback? onPressed,
  5. required Color color,
  6. bool isFocusable = true,
  7. bool autofocus = false,
  8. MouseCursor cursor = MouseCursor.defer,
  9. String? semanticLabel,
})

Creates An Arna-styled color button.

The color button itself does not maintain any state. Instead, when the color button is selected, the widget calls the onPressed callback. Most widgets that use a color button will listen for the onPressed callback and rebuild the color button with a new groupValue to update the visual appearance of the color button.

The following arguments are required:

  • value and groupValue together determine whether the color button is selected.
  • onPressed is called when the user selects this color button.

Implementation

const ArnaColorButton({
  super.key,
  required this.value,
  required this.groupValue,
  required this.onPressed,
  required this.color,
  this.isFocusable = true,
  this.autofocus = false,
  this.cursor = MouseCursor.defer,
  this.semanticLabel,
});