ColourPicker constructor

const ColourPicker({
  1. Key? key,
  2. required Color pickerColour,
  3. required ValueChanged<Color> onColourChanged,
  4. HSVColor? pickerHsvColour,
  5. ValueChanged<HSVColor>? onHsvColourChanged,
  6. PaletteType paletteType = PaletteType.hsvWithHue,
  7. bool enableAlpha = true,
  8. @Deprecated('Use empty list in [labelTypes] to disable label.') bool showLabel = true,
  9. List<ColorLabelType> labelTypes = const [ColorLabelType.rgb, ColorLabelType.hsv, ColorLabelType.hsl],
  10. @Deprecated('Use Theme.of(context).textTheme.bodyText1 & 2 to alter text style.') TextStyle? labelTextStyle,
  11. bool displayThumbColor = false,
  12. bool portraitOnly = false,
  13. double colourPickerWidth = 300.0,
  14. double pickerAreaHeightPercent = 1.0,
  15. BorderRadius pickerAreaBorderRadius = const BorderRadius.all(Radius.zero),
  16. bool hexInputBar = false,
  17. TextEditingController? hexInputController,
  18. List<Color>? colorHistory,
  19. ValueChanged<List<Color>>? onHistoryChanged,
})

Implementation

const ColourPicker({
  super.key,
  required this.pickerColour,
  required this.onColourChanged,
  this.pickerHsvColour,
  this.onHsvColourChanged,
  this.paletteType = PaletteType.hsvWithHue,
  this.enableAlpha = true,
  @Deprecated('Use empty list in [labelTypes] to disable label.')
  this.showLabel = true,
  this.labelTypes = const [
    ColorLabelType.rgb,
    ColorLabelType.hsv,
    ColorLabelType.hsl,
  ],
  @Deprecated(
    'Use Theme.of(context).textTheme.bodyText1 & 2 to alter text style.',
  )
  this.labelTextStyle,
  this.displayThumbColor = false,
  this.portraitOnly = false,
  this.colourPickerWidth = 300.0,
  this.pickerAreaHeightPercent = 1.0,
  this.pickerAreaBorderRadius = const BorderRadius.all(Radius.zero),
  this.hexInputBar = false,
  this.hexInputController,
  this.colorHistory,
  this.onHistoryChanged,
});