ColorWheelPicker class

A HSV color wheel based color picker for Flutter, used by FlexColorPicker.

The color wheel picker uses a custom painter to draw the HSV color wheel and rectangle. It can also be used on its own in other color picker implementations.

Inheritance
Annotations

Constructors

ColorWheelPicker({Key? key, required Color color, required ValueChanged<Color> onChanged, ValueChanged<Color>? onChangeStart, ValueChanged<Color>? onChangeEnd, required ValueChanged<bool> onWheel, double wheelWidth = 16.0, double wheelSquarePadding = 0, double wheelSquareBorderRadius = 4, bool hasBorder = false, Color? borderColor, bool shouldUpdate = false, bool shouldRequestsFocus = false})
Default constructor for the color wheel picker.
const

Properties

borderColor Color?
Color of the border around around the circle and rectangle control.
final
color Color
The starting color value for the wheel color picker.
final
hasBorder bool
Set to true to draw a border around the color controls.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onChanged ValueChanged<Color>
Callback that returns the currently selected color in the color wheel as a Color.
final
onChangeEnd ValueChanged<Color>?
Optional ValueChanged callback, called when user ends color selection with the new color value.
final
onChangeStart ValueChanged<Color>?
Optional ValueChanged callback, called when user starts color selection operation with the current color value.
final
onWheel ValueChanged<bool>
Required ValueChanged callback, called with true when the wheel is operated and false otherwise.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldRequestsFocus bool
Set to true when the ColorWheelPicker should request focus.
final
shouldUpdate bool
If the widget color update should also update the wheel, set to true. This should be set to true by parent every time color has been updated by parent and not internally by operating the wheel.
final
wheelSquareBorderRadius double
Border radius of the shade square inside the hue wheel.
final
wheelSquarePadding double
Padding between shade square inside the hue wheel and inner side of the wheel.
final
wheelWidth double
The width of the color wheel in dp.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ColorWheelPicker>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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