ColorPicker constructor
const
ColorPicker({
- Key? key,
- required Color pickerColor,
- required ValueChanged<
Color> onColorChanged, - HSVColor? pickerHsvColor,
- ValueChanged<
HSVColor> ? onHsvColorChanged, - PaletteType paletteType = PaletteType.hsvWithHue,
- bool enableAlpha = true,
- @Deprecated('Use empty list in [labelTypes] to disable label.') bool showLabel = true,
- List<
ColorLabelType> labelTypes = const [ColorLabelType.rgb, ColorLabelType.hsv, ColorLabelType.hsl], - @Deprecated('Use Theme.of(context).textTheme.bodyText1 & 2 to alter text style.') TextStyle? labelTextStyle,
- bool displayThumbColor = false,
- bool portraitOnly = false,
- double colorPickerWidth = 300.0,
- double pickerAreaHeightPercent = 1.0,
- BorderRadius pickerAreaBorderRadius = const BorderRadius.all(Radius.zero),
- bool hexInputBar = false,
- TextEditingController? hexInputController,
- List<
Color> ? colorHistory, - ValueChanged<
List< ? onHistoryChanged,Color> >
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);