ColorPicker constructor

const ColorPicker({
  1. Key? key,
  2. required Color pickerColor,
  3. required ValueChanged<Color> onColorChanged,
  4. HSVColor? pickerHsvColor,
  5. ValueChanged<HSVColor>? onHsvColorChanged,
  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 colorPickerWidth = 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 ColorPicker({
  Key? key,
  required this.pickerColor,
  required this.onColorChanged,
  this.pickerHsvColor,
  this.onHsvColorChanged,
  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.colorPickerWidth = 300.0,
  this.pickerAreaHeightPercent = 1.0,
  this.pickerAreaBorderRadius = const BorderRadius.all(Radius.zero),
  this.hexInputBar = false,
  this.hexInputController,
  this.colorHistory,
  this.onHistoryChanged,
}) : super(key: key);