MDCChip class

Encompasses the behavior of a single chip. All of MDCChip’s emitted events bubble up through the DOM.

Javascript: mdc.chips.MDCChip.

Inheritance

Constructors

MDCChip(Element root, [MDCFoundation? foundation, dynamic args])

Properties

foundation MDCFoundation
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
This will be the same as the id attribute on the root element. If an id is not provided, a unique one will be generated.
no setter
js → ChipComponent
The underlying Javascript component.
no setteroverride
ripple MDCRipple
no setter
root Element
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selected bool?
getter/setter pair
shouldRemoveOnTrailingIconClick bool?
getter/setter pair

Methods

beginExit() → void
If shouldRemoveOnTrailingIconClick is set to false, you must manually call beginExit() on the chip to remove it.
destroy() → void
Releases resources and removes any listeners.
inherited
emit(String type, dynamic data, [bool shouldBubble = false]) → void
inherited
listen(String type, EventListener handler, {bool captureThis = false}) → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
unlisten(String type, EventListener handler, {bool captureThis = false}) → void
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

attachTo(Element root) MDCChip

Constants

interactionEvent → const String
Indicates the chip was interacted with (via click/tap or Enter key).
removalEvent → const String
Indicates the chip is ready to be removed from the DOM.
selectionEvent → const String
Indicates the chip’s selection state has changed (for choice/filter chips).
trailingIconInteractionEvent → const String
Indicates the chip’s trailing icon was interacted with (via click/tap or Enter key).