HasSelectionRationale<T> class abstract

An optional interface for describing why an item is/is not selectable.

Example use: MaterialSuggestItem(@Optional() HasSelectableRationale rationale) { // May use rationale.getSelectableRationale to show a tooltip. }

It is recommended you always make this optional when injecting, or default to HasSelectionRationale.none to avoid null checks: selectionRationale ??= const HasSelectionRationale.none();

Constructors

HasSelectionRationale.none()
Create a default HasSelectionRationale that always returns null.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getSelectableRationale(T item, [bool isSelectable = false]) String?
Returns a string describing why item on why isSelectable.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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