BaseChip class

Base animated chip widget used by all public chip variants.

Inheritance

Constructors

BaseChip({Key? key, required String label, ChipStyle? style, SdChipThemeData? theme, Widget? leading, Widget? trailing, bool? selected, bool initialSelected = false, bool enabled = true, bool toggleable = true, VoidCallback? onTap, ValueChanged<bool>? onSelected, Duration? duration, Curve? curve, double? pressedScale, String? semanticsLabel, String? tooltip, int maxLines = 1, TextOverflow overflow = TextOverflow.ellipsis})
Creates a reusable animated chip.
const

Properties

curve Curve?
Per-widget animation curve override.
final
duration Duration?
Per-widget animation duration override.
final
enabled bool
Disabled state.
final
hashCode int
The hash code for this object.
no setterinherited
initialSelected bool
Initial state for uncontrolled chips.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label String
Main label.
final
leading Widget?
Leading content such as an icon or avatar.
final
maxLines int
Max text lines.
final
onSelected ValueChanged<bool>?
Selection callback.
final
onTap VoidCallback?
Tap callback.
final
overflow TextOverflow
Overflow behavior for the label.
final
pressedScale double?
Per-widget pressed scale override.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selected bool?
Controlled selected state.
final
semanticsLabel String?
Optional semantic label override.
final
style ChipStyle?
Optional per-widget style override.
final
theme SdChipThemeData?
Optional per-widget theme override.
final
toggleable bool
Whether the chip toggles its selected state on tap.
final
tooltip String?
Optional tooltip shown on long press/hover.
final
trailing Widget?
Trailing content such as an indicator or delete action.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<BaseChip>
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, int wrapWidth = 65}) 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