ColorPickerField class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ColorPickerField
Constructors
-
ColorPickerField({Key? key, FocusNode? focusNode, bool colorListReversed = false, InputDecoration? decoration = const InputDecoration(), required Color defaultColor, bool? readOnly = false, List<
Color> colors = const <Color>[], ValueChanged<List< ? onChanged, ValueChanged<Color> >String> ? onSubmitted, bool? enabled, TextStyle? style, ScrollPhysics? scrollPhysics, ScrollController? scrollController, int? maxColors, ColorPickerFieldController? controller, MouseCursor? mouseCursor, String? restorationId, InputCounterWidgetBuilder? buildCounter, bool enableLightness = false, bool enableSaturation = false, SelectedColorItemBuilder? selectedColorItemBuilder}) -
const
Properties
- buildCounter → InputCounterWidgetBuilder?
-
Callback that generates a custom InputDecoration.counter widget.
final
- colorListReversed → bool
-
final
-
colors
→ List<
Color> -
An initial list of colors, if not passed, default to an empty list
final
- controller → ColorPickerFieldController?
-
Provides a way to listen for colors list changes
Controls the colors being edited.
final
- decoration → InputDecoration?
-
final
- defaultColor → Color
-
Required. Controls the default color of the color picker launched from the field.
final
- enabled → bool?
-
Controls if the color picker field is enabled, default to true
final
- enableLightness → bool
-
Enable the lightness control for the color value.
final
- enableSaturation → bool
-
Enable the saturation control for the color value.
final
- focusNode → FocusNode?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxColors → int?
-
If maxColors is set to this value, only the "current colors number"
part of the colors counter is shown.
final
- mouseCursor → MouseCursor?
-
The cursor for a mouse pointer when it enters or is hovering over the
widget.
final
-
onChanged
→ ValueChanged<
List< ?Color> > -
A callback triggered every time a color was added or removed to/from the field
final
-
onSubmitted
→ ValueChanged<
String> ? -
final
- readOnly → bool?
-
Controls of the color picker field is read only, defaults to false
final
- restorationId → String?
-
Restoration ID to save and restore the state of the color picker field.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
Responsible for controlling the horizontal animated colors list in the field
final
- scrollPhysics → ScrollPhysics?
-
If null, defaults to default for the platform scroll physics.
Responsible for the scroll physics of the horizontal animated colors list in the field
final
- selectedColorItemBuilder → SelectedColorItemBuilder?
-
final
- style → TextStyle?
-
This text style is used as the base style for the decoration.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ColorPickerField> -
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.
override
-
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