RawChip class

A raw material design chip.

This serves as the basis for all of the chip widget types to aggregate. It is typically not created directly, one of the other chip types that are appropriate for the use case are used instead:

  • Chip a simple chip that can only display information and be deleted.
  • InputChip represents a complex piece of information, such as an entity (person, place, or thing) or conversational text, in a compact form.
  • ChoiceChip allows a single selection from a set of options.
  • FilterChip a chip that uses tags or descriptive words as a way to filter content.
  • ActionChips display a set of actions related to primary content.

Raw chips are typically only used if you want to create your own custom chip type.

Raw chips can be selected by setting onSelected, deleted by setting onDeleted, and pushed like a button with onPressed. They have a label, and they can have a leading icon (see avatar) and a trailing icon (deleteIcon). Colors and padding can be customized.

Requires one of its ancestors to be a Material widget.

See also:

Inheritance
Implements

Constructors

RawChip({Key key, Widget avatar, @required Widget label, TextStyle labelStyle, EdgeInsetsGeometry padding, EdgeInsetsGeometry labelPadding, Widget deleteIcon, VoidCallback onDeleted, Color deleteIconColor, String deleteButtonTooltipMessage, VoidCallback onPressed, ValueChanged<bool> onSelected, bool tapEnabled: true, bool selected, bool showCheckmark: true, bool isEnabled: true, Color disabledColor, Color selectedColor, String tooltip, ShapeBorder shape, Color backgroundColor, MaterialTapTargetSize materialTapTargetSize })
Creates a RawChip [...]
const

Properties

avatar Widget
final
backgroundColor Color
final
deleteButtonTooltipMessage String
final
deleteIcon Widget
final
deleteIconColor Color
final
disabledColor Color
final
isEnabled bool
final
label Widget
final
labelPadding EdgeInsetsGeometry
final
labelStyle TextStyle
final
materialTapTargetSize MaterialTapTargetSize
final
onDeleted VoidCallback
final
onPressed VoidCallback
final
onSelected ValueChanged<bool>
final
padding EdgeInsetsGeometry
final
selected bool
final
selectedColor Color
final
shape ShapeBorder
final
showCheckmark bool
Whether or not to show a check mark when selected is true. [...]
final
tapEnabled bool
If set, this indicates that the chip should be disabled if all of the tap callbacks (onSelected, onPressed) are null. [...]
final
tooltip String
final
hashCode int
The hash code for this object. [...]
read-only, inherited
key Key
Controls how one widget replaces another widget in the tree. [...]
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

createState() → _RawChipState
Creates the mutable state for this widget at a given location in the tree. [...]
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
@pragma('vm:entry-point'), inherited
toDiagnosticsNode({String name, DiagnosticsTreeStyle style }) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by toStringDeep. [...]
inherited
toString({DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns 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 ==(dynamic other) bool
The equality operator. [...]
inherited