C2Choice<T> class

Choice option

Constructors

C2Choice({@required T value, @required String label, String tooltip, bool disabled = false, bool hidden = false, dynamic meta, C2ChoiceStyle style, C2ChoiceStyle activeStyle, dynamic select(bool selected), bool selected = false})
Default Constructor
const

Properties

activeStyle C2ChoiceStyle
Individual choice selected item style
final
disabled bool
Whether the choice is disabled or not
final
hashCode int
The hash code for this object. [...]
read-only, override
hidden bool
Whether the choice is hidden or displayed
final
label String
Represent as primary text
final
meta → dynamic
This prop is useful for choice builder
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
select → dynamic Function(bool selected)
Callback to select choice autofill by the system used in choice builder
final
selected bool
Whether the choice is selected or not autofill by the system used in choice builder
final
style C2ChoiceStyle
Individual choice unselected item style
final
tooltip String
Tooltip string to be used for the body area (where the label and avatar are) of the chip.
final
value → T
Value to return
final

Methods

copyWith({T value, String label, String tooltip, bool disabled, bool hidden, dynamic meta, C2ChoiceStyle style, C2ChoiceStyle activeStyle, dynamic select(bool selected), bool selected}) C2Choice<T>
Creates a copy of this C2Choice but with the given fields replaced with the new values.
merge(C2Choice<T> other) C2Choice<T>
Creates a copy of this S2Choice but with the given fields replaced with the new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
override

Static Methods

listFrom<R, E>({List<E> source, _C2ChoiceProp<E, R> value, _C2ChoiceProp<E, String> label, _C2ChoiceProp<E, String> tooltip, _C2ChoiceProp<E, bool> disabled, _C2ChoiceProp<E, bool> hidden, _C2ChoiceProp<E, dynamic> meta, _C2ChoiceProp<E, C2ChoiceStyle> style, _C2ChoiceProp<E, C2ChoiceStyle> activeStyle}) List<C2Choice<R>>
Helper to create choice items from any list