S2Choice<T> class

Choice option configuration

Constructors

S2Choice({@required T value, @required String title, String subtitle, String group, bool disabled = false, bool hidden = false, dynamic meta, dynamic select(bool selected), bool selected = false})
Default constructor

Properties

disabled → bool
Whether the option is disabled or enabled
final
group → String
The option will grouped by this property value
final
hashCode → int
The hash code for this object. [...]
read-only, override
hidden → bool
Whether the option is displayed or not
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
final
selected → bool
Whether the choice is selected or not
final
subtitle → String
Represent as secondary text
final
title → String
Represent as primary text
final
value → T
Value to return
final

Methods

contains(String query) → bool
copyWith({T value, String title, String subtitle, String group, bool disabled, bool hidden, dynamic meta, dynamic select(bool selected), bool selected}) S2Choice<T>
Creates a copy of this S2Choice but with the given fields replaced with the new values.
merge(S2Choice<T> other) S2Choice<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
Returns a string representation of this object.
inherited

Operators

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

Static Methods

listFrom<R, E>({List<E> source, _S2OptionProp<E, R> value, _S2OptionProp<E, String> title, _S2OptionProp<E, String> subtitle, _S2OptionProp<E, String> group, _S2OptionProp<E, bool> disabled, _S2OptionProp<E, bool> hidden, _S2OptionProp<E, dynamic> meta}) → List<S2Choice<R>>
Helper to create option list from any list