ColorIndicator class
A Material widget used as a color indicator and color selector by the
FlexColorPicker package's ColorPicker
widget.
The color indicator can also be used on its own as a color label, e.g. in a ListTile widget. It has adjustable, height, width, selection indicator icon and convenience properties for rounded corners and optional border.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ColorIndicator
- Annotations
Constructors
- ColorIndicator({Key? key, VoidCallback? onSelect, bool onSelectFocus = true, bool isSelected = false, bool selectedRequestsFocus = false, double elevation = 0, IconData selectedIcon = Icons.check, Color color = Colors.blue, double width = 40, double height = 40, double borderRadius = 10, bool hasBorder = false, Color? borderColor})
-
Default const constructor for the color indicator.
const
Properties
- borderColor → Color?
-
Color of the border on the color indicator.
final
- borderRadius → double
-
Border radius of the color indicator
final
- color → Color
-
The background color of the color indicator.
final
- elevation → double
-
Material elevation of the color indicator.
final
- hasBorder → bool
-
Set to true if a 1 dp outline border should be drawn around the
color indicator.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
Height of the color indicator.
final
- isSelected → bool
-
The color indicator is selected and the selectedIcon will be shown.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onSelect → VoidCallback?
-
Optional void callback, called when the color indicator is tapped.
final
- onSelectFocus → bool
-
Set to false if the indicator should not get focus after user clicked
on it.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedIcon → IconData
-
IconData used to indicate that the color indicator is selected.
final
- selectedRequestsFocus → bool
-
Set to true, if an indicator should request focus if it is selected.
final
- width → double
-
Width of the color indicator.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ColorIndicator> -
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