S2MultiSelection<T> class
Null safety
- Inheritance
-
- Object
- ChangeNotifier
- S2ChosenNotifier<
T> - S2Selection<
T> - S2MultiSelection
- Mixed in types
Constructors
-
S2MultiSelection({required List<
S2Choice< ? initial, S2Validation<T> >S2MultiChosen< ? validation})T> > - Default constructor
Properties
-
choice
↔ List<
S2Choice< T> > -
Returns the choice item(s)
covariantread / writeoverride
- error ↔ String
-
Validation error message
read / writeinherited
-
group
→ List<
String> ? -
Returns an array of
group
of the choiceread-onlyinherited - hashCode → int
-
The hash code for this object.
read-onlyinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
read-onlyinherited
-
initial
↔ List<
S2Choice< T> > -
The Initial selection
covariantfinalread / writeinherited-setteroverride-getter
- isEmpty → bool
-
Returns
true
if there are no values in the chosen dataread-onlyinherited - isNotEmpty → bool
-
Returns
true
if there is at least one value in the chosen dataread-onlyinherited - isNotValid → bool
-
Returns true when the selection is not valid
read-onlyinherited
- isValid → bool
-
Returns true when the selection is valid
read-onlyinherited
- length → int
-
Returns the length of the choice
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
-
subtitle
→ List<
String> ? -
Returns an array of
subtitle
of the choiceread-onlyinherited -
title
→ List<
String> ? -
Returns an array of
title
of the choiceread-onlyinherited -
validation
↔ S2Validation<
S2MultiChosen< ?T> > -
A function used to validate the selection
covariantfinalread / writeinherited-setteroverride-getter
-
value
→ List<
T> -
Returns an array of
value
of the current choiceread-onlyinherited
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
override
-
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 selection has every of the supplied values
inherited
-
hasAny(
List< S2Choice< choices) → boolT> > -
Returns
true
if the selection has any of the supplied valuesinherited -
merge(
List< S2Choice< choices) → voidT> > - Add every value in supplied values into the selection
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
omit(
List< S2Choice< ? choices) → voidT> > - Removes every value in supplied values from the selection
-
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
override
-
select(
S2Choice< T> choice, {bool selected = true}) → void -
Select or unselect a choice
override
-
toggle(
List< S2Choice< choices, {bool? pull}) → voidT> > - Toggle put/pull the supplied values from the selection
-
toString(
) → String -
A string representation of this object.
override
-
toWidget(
) → Widget -
Return a Text widget from toString
inherited
-
validate(
) → void -
Validate the selection
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited