SquarePicker constructor

const SquarePicker({
  1. Key? key,
  2. required Color currentColour,
  3. required ValueChanged<Color> onColorChanged,
  4. HSVColour? pickerHsvColor,
  5. ValueChanged<HSVColour>? onHsvColorChanged,
  6. PaletteType paletteType = PaletteType.hsvWithHue,
  7. bool enableAlpha = true,
  8. bool showLabel = true,
  9. List<ColorLabelType> labelTypes = const [ColorLabelType.rgb, ColorLabelType.hsv, ColorLabelType.hsl],
  10. bool displayThumbColor = false,
  11. bool portraitOnly = false,
  12. double colorPickerWidth = 300.0,
  13. double pickerAreaHeightPercent = 1.0,
  14. BorderRadius pickerAreaBorderRadius = const BorderRadius.all(Radius.zero),
  15. List<Color>? colorHistory,
  16. ValueChanged<List<Color>>? onHistoryChanged,
})

Implementation

const SquarePicker({
  super.key,
  required this.currentColour,
  required this.onColorChanged,
  this.pickerHsvColor,
  this.onHsvColorChanged,
  this.paletteType = PaletteType.hsvWithHue,
  this.enableAlpha = true,
  this.showLabel = true,
  this.labelTypes = const [
    ColorLabelType.rgb,
    ColorLabelType.hsv,
    ColorLabelType.hsl,
  ],
  this.displayThumbColor = false,
  this.portraitOnly = false,
  this.colorPickerWidth = 300.0,
  this.pickerAreaHeightPercent = 1.0,
  this.pickerAreaBorderRadius = const BorderRadius.all(Radius.zero),
  this.colorHistory,
  this.onHistoryChanged,
});