S2Selection<T> class
abstract
- Inheritance
-
- Object
- ChangeNotifier
- S2ChosenNotifier<
T> - S2Selection
- Implementers
Constructors
Properties
- choice ↔ dynamic
-
Returns the choice item(s)
covariantgetter/setter pairinherited-getter
- error ↔ String
-
Validation error message
getter/setter pairinherited
- group → dynamic
-
Returns the group(s) data
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- initial ↔ dynamic
-
The initial selection
covariantgetter/setter pair
- isEmpty → bool
-
Returns
true
if there are no values in the chosen datano setterinherited - isNotEmpty → bool
-
Returns
true
if there is at least one value in the chosen datano setterinherited - isNotValid → bool
-
Returns true when the selection is not valid
no setterinherited
- isValid → bool
-
Returns true when the selection is valid
no setterinherited
- length → int
-
Returns the length of the choice
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subtitle → dynamic
-
Returns the subtitle(s) data
no setterinherited
- title → dynamic
-
Returns the title(s) data
no setterinherited
- validation ↔ dynamic
-
A Function used to validate the selection(s)
covariantgetter/setter pairinherited
- value → dynamic
-
Returns the value(s) data
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
clear(
) → void - Removes all choice(s) from the selection
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
has(
S2Choice< T> choice) → bool -
Returns
true
if the chosen contains the supplied choice iteminherited -
hasAll(
List< S2Choice< choices) → boolT> > -
Returns `true if the chosen has every of the supplied choice items
inherited
-
hasAny(
List< S2Choice< choices) → boolT> > -
Returns
true
if the chosen has any of the supplied choice itemsinherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
reset(
) → void - Reset the current selection to the initial selection
-
select(
S2Choice< T> choice, {bool selected = true}) → void - Select or unselect a choice
-
toString(
) → String -
Returns a string that can be used as display,
returns title if is valid and is not empty,
returns placeholder if is valid and is empty.
inherited
-
toWidget(
) → Widget -
Return a Text widget from toString
inherited
-
validate(
) → void -
Validate the selection
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited