ColourPicker class

Central factory for creating colour picker widgets.

Rather than instantiating picker classes directly, use the static methods on this class to get the picker style you need:

  • ColourPicker.wheel — A circular hue wheel with saturation mapped radially, plus value/alpha sliders.
  • ColourPicker.square — A rectangular palette that supports multiple colour models (HSV, HSL, RGB) with configurable axes.
  • ColourPicker.ring — A hue ring surrounding a compact SV palette.
  • ColourPicker.slides — Individual channel sliders (R/G/B, H/S/V, or H/S/L) with optional comparison indicator.

Each method returns a ready-to-use Widget that you can drop into your widget tree.

Constructors

ColourPicker()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

ring({required Color currentColour, required ValueChanged<Color> onColorChanged, bool portraitOnly = false, double colorPickerHeight = 250.0, double hueRingStrokeWidth = 20.0, bool enableAlpha = false, bool displayThumbColor = true, BorderRadius pickerAreaBorderRadius = const BorderRadius.all(Radius.zero)}) Widget
Creates a hue ring colour picker.
slides({required Color currentColour, required ValueChanged<Color> onColorChanged, ColorModel colorModel = ColorModel.rgb, bool enableAlpha = true, Size sliderSize = const Size(260, 40), bool showSliderText = true, TextStyle? sliderTextStyle, bool showLabel = true, bool showParams = true, List<ColorLabelType> labelTypes = const [], TextStyle? labelTextStyle, bool showIndicator = true, Size indicatorSize = const Size(280, 50), AlignmentGeometry indicatorAlignmentBegin = const Alignment(-1.0, -3.0), AlignmentGeometry indicatorAlignmentEnd = const Alignment(1.0, 3.0), bool displayThumbColor = true, BorderRadius indicatorBorderRadius = const BorderRadius.all(Radius.zero)}) Widget
Creates a slider-based colour picker.
square({required Color currentColour, required ValueChanged<Color> onColorChanged, HSVColour? pickerHsvColor, ValueChanged<HSVColor>? onHsvColorChanged, PaletteType paletteType = PaletteType.hueWheel, bool enableAlpha = true, bool showLabel = true, List<ColorLabelType> labelTypes = const [ColorLabelType.rgb, ColorLabelType.hex], bool displayThumbColor = true, bool portraitOnly = false, double colorPickerWidth = 300, double pickerAreaHeightPercent = 1.0, bool hexInputBar = false, TextEditingController? hexInputController, BorderRadius? pickerAreaBorderRadius, List<Color>? colorHistory, ValueChanged<List<Color>>? onHistoryChanged}) Widget
Creates a square palette colour picker.
wheel({required Colour currentColour, required ValueChanged<Colour> onColourChanged, double size = 700, PickerStyle style = const PickerStyle(padding: EdgeInsets.all(10), margin: EdgeInsets.all(10), decoration: BoxDecoration(color: AppTheme.lightBackground, borderRadius: BorderRadius.all(Radius.circular(20)))), bool enableAlpha = true, bool showLabel = true, bool displayThumbColor = true, Orientation orientation = Orientation.landscape, HSVColour? pickerHsvColour, ValueChanged<HSVColor>? onHsvColourChanged, List<Colour>? colourHistory, ValueChanged<List<Color>>? onHistoryChanged}) Widget
Creates a colour wheel picker.