MultiSelectFieldBloc<Value> class
Constructors
-
MultiSelectFieldBloc({String? name, List<Value> initialValue = const [], bool enabled = true, bool readOnly = false, bool loading = false, bool? required, Set<Validator<List<Value>>>? customValidators, Set<ValidationType> rules = const {}, List<Value> options = const [], List<Value> disabledOptions = const [], dynamic data, bool ordered = false, bool forceValueToSet = false})
-
Methods
-
addError(Object error, [StackTrace? stackTrace])
→ void
-
Reports an
error which triggers onError with an optional StackTrace.
inherited
-
addFieldError(String error, {bool? isDirty})
→ void
-
It is useful when you want to add errors that
you have obtained when submitting the
FormBloc.
inherited
-
addOption(Value newItem)
→ void
-
-
addOptions(List<Value> newOptions)
→ void
-
-
addRule(ValidationType rule)
→ void
-
inherited
-
addRules(Set<ValidationType> rules)
→ void
-
inherited
-
addValidator(Validator<List<Value>> validator, {bool forceValidation = false})
→ void
-
inherited
-
addValidators(Set<Validator<List<Value>>> validators, {bool forceValidation = false})
→ void
-
inherited
-
changeAvailability(bool enabled)
→ void
-
inherited
-
changeData(dynamic data)
→ void
-
inherited
-
changeDisabledOptions(List<Value> disabledOptions)
→ void
-
-
inherited
-
changeLoading(bool loading)
→ void
-
inherited
-
changeOptions(List<Value> options)
→ void
-
-
changeReadOnly(bool readOnly)
→ void
-
inherited
-
changeRequirement(bool required, {bool forceValidation = false})
→ void
-
inherited
-
changeRules(Set<ValidationType> rules)
→ void
-
inherited
-
changeValidators(Set<Validator<List<Value>>> validators, {bool forceValidation = false})
→ void
-
inherited
-
changeValue(List<Value> value, {bool forceChange = false})
→ void
-
inherited
-
clear({bool force = false})
→ void
-
inherited
-
clearDisabledOptions()
→ void
-
-
clearOptions()
→ void
-
-
clearRules()
→ void
-
inherited
-
clearValidators()
→ void
-
inherited
-
close()
→ Future<void>
-
Closes the instance.
This method should be called when the instance is no longer needed.
Once
close is called, the instance can no longer be used.
inherited
-
deselectValue(Value valueToDeselect)
→ void
-
-
emit(MultiSelectFieldBlocState<Value> state)
→ void
-
Updates the
state to the provided state.
emit does nothing if the state being emitted
is equal to the current state.
-
focusChanged()
→ void
-
inherited
-
getError(List<Value> value, {Set<String? Function(List<Value>)>? newValidators})
→ String?
-
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onChange(Change<MultiSelectFieldBlocState<Value>> change)
→ void
-
Called whenever a
change occurs with the given change.
A change occurs when a new state is emitted.
onChange is called before the state of the cubit is updated.
onChange is a great spot to add logging/analytics for a specific cubit.
inherited
-
onError(Object error, StackTrace stackTrace)
→ void
-
Called whenever an
error occurs and notifies BlocObserver.onError.
inherited
-
removeFormBloc(FormBloc formBloc)
→ void
-
inherited
-
removeOption(Value item)
→ void
-
-
removeOptions(List<Value> options)
→ void
-
-
removeRule(ValidationType rule)
→ void
-
inherited
-
removeRules(Set<ValidationType> rules)
→ void
-
inherited
-
removeValidator(Validator<List<Value>> validator, {bool forceValidation = false})
→ void
-
inherited
-
removeValidators(Set<Validator<List<Value>>> validators, {bool forceValidation = false})
→ void
-
inherited
-
reset({bool force = false})
→ void
-
inherited
-
selectValue(Value valueToSelect)
→ void
-
-
toNullableString()
→ String?
-
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateFormBloc(FormBloc formBloc)
→ void
-
inherited
-
updateInitial(List<Value> value, {bool forceChange = false})
→ void
-
inherited
-
validate()
→ bool
-
inherited