MoonChip class

Inheritance

Constructors

MoonChip({Key? key, bool autofocus = false, bool isFocusable = true, bool ensureMinimalTouchTargetSize = false, bool isActive = false, bool showBorder = false, bool showFocusEffect = true, BorderRadiusGeometry? borderRadius, Color? activeColor, Color? backgroundColor, Color? activeBackgroundColor, Color? borderColor, Color? focusEffectColor, Color? textColor, Decoration? decoration, double? borderWidth, double? disabledOpacityValue, double? focusEffectExtent, double? gap, double? height, double? width, double minTouchTargetSize = 40, Duration? activeEffectDuration, Duration? focusEffectDuration, Curve? activeEffectCurve, Curve? focusEffectCurve, EdgeInsetsGeometry? padding, FocusNode? focusNode, MoonChipSize? chipSize, String? semanticLabel, VoidCallback? onTap, VoidCallback? onLongPress, Widget? label, Widget? leading, Widget? trailing})
Creates a Moon Design chip.
const
MoonChip.text({Key? key, bool autofocus = false, bool isFocusable = true, bool ensureMinimalTouchTargetSize = false, bool isActive = false, bool showBorder = false, bool showFocusEffect = true, BorderRadiusGeometry? borderRadius, Color? activeColor, Color? activeBackgroundColor, Color? borderColor, Color? focusEffectColor, Color? textColor, double? borderWidth, double? disabledOpacityValue, double? focusEffectExtent, double? gap, double? height, double? width, double minTouchTargetSize = 40, Duration? focusEffectDuration, Duration? activeEffectDuration, Curve? focusEffectCurve, Curve? activeEffectCurve, EdgeInsetsGeometry? padding, FocusNode? focusNode, MoonChipSize? chipSize, Decoration? decoration, String? semanticLabel, VoidCallback? onTap, VoidCallback? onLongPress, Widget? label, Widget? leading, Widget? trailing})
Creates a Moon Design text chip.
const

Properties

activeBackgroundColor Color?
The background color of the chip when isActive is true.
final
activeColor Color?
The text and border color of the chip when isActive is true.
final
activeEffectCurve Curve?
The curve of the chip active state effect.
final
activeEffectDuration Duration?
The duration of the chip active state effect.
final
autofocus bool
True if this widget will be selected as the initial focus when no other node in its scope is currently focused.
final
backgroundColor Color?
The background color of the chip.
final
borderColor Color?
The border color of the chip.
final
borderRadius BorderRadiusGeometry?
The border radius of the chip.
final
borderWidth double?
The border width of the chip.
final
chipSize MoonChipSize?
The size of the chip.
final
decoration Decoration?
The custom decoration of the chip.
final
disabledOpacityValue double?
The opacity value of the disabled chip.
final
ensureMinimalTouchTargetSize bool
Whether to ensure a minimum touch target size for the chip.
final
focusEffectColor Color?
The color of the chip focus effect.
final
focusEffectCurve Curve?
The curve of the chip focus effect.
final
focusEffectDuration Duration?
The duration of the chip focus effect.
final
focusEffectExtent double?
The extent of the chip focus effect.
final
focusNode FocusNode?
An optional focus node to use as the focus node for this widget.
final
gap double?
The gap between the leading, label and trailing widgets of the chip.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
The height of the chip.
final
isActive bool
Whether the chip is active (selected).
final
isFocusable bool
Whether the chip is focusable.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label Widget?
The primary content of the chip widget.
final
leading Widget?
The widget to display before the label widget of the chip.
final
minTouchTargetSize double
The minimum size of the chip touch target.
final
onLongPress VoidCallback?
The callback that is called when the chip is long-pressed.
final
onTap VoidCallback?
The callback that is called when the chip is tapped or pressed.
final
padding EdgeInsetsGeometry?
The padding of the chip.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
The semantic label for the chip.
final
showBorder bool
Whether to show a border around the chip.
final
showFocusEffect bool
Whether to show a focus outline effect when the chip is focused.
final
textColor Color?
The text color of the chip.
final
trailing Widget?
The widget to display after the label widget of the chip.
final
width double?
The width of the chip.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<MoonChip>
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