AppChip class

A Material Design chip component.

Inheritance

Constructors

AppChip({Key? key, required String label, AppChipType type = AppChipType.action, bool selected = false, ValueChanged<bool>? onSelected, VoidCallback? onDeleted, Widget? avatar, Widget? deleteIcon, bool enabled = true, Color? backgroundColor, Color? selectedColor, TextStyle? labelStyle, TextStyle? selectedLabelStyle, double? borderRadius, Color? borderColor, Color? selectedBorderColor, Color? deleteIconColor, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? labelPadding, double? elevation, Color? shadowColor, IconThemeData? iconTheme})
Creates a chip.
const

Properties

avatar Widget?
Optional avatar widget displayed before the label.
final
backgroundColor Color?
Optional background color override.
final
borderColor Color?
Optional border color.
final
borderRadius double?
Optional border radius override.
final
deleteIcon Widget?
Optional custom delete icon.
final
deleteIconColor Color?
Optional color for the delete icon.
final
elevation double?
Optional elevation.
final
enabled bool
Whether the chip is enabled.
final
hashCode int
The hash code for this object.
no setterinherited
iconTheme IconThemeData?
Optional icon theme for the avatar.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label String
The label text of the chip.
final
labelPadding EdgeInsetsGeometry?
Optional padding for the label.
final
labelStyle TextStyle?
Optional text style for the label.
final
onDeleted VoidCallback?
Called when the delete icon is tapped.
final
onSelected ValueChanged<bool>?
Called when the chip is selected/deselected.
final
padding EdgeInsetsGeometry?
Optional padding for the chip.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selected bool
Whether the chip is selected (for filter/choice chips).
final
selectedBorderColor Color?
Optional border color when selected.
final
selectedColor Color?
Optional background color when selected.
final
selectedLabelStyle TextStyle?
Optional text style for the label when selected.
final
shadowColor Color?
Optional shadow color.
final
type AppChipType
The type of chip.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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