SelectFieldBloc<Value> class
Constructors
-
SelectFieldBloc({String? name, Value? initialValue, bool enabled = true, bool readOnly = false, bool loading = false, bool? required, Set<Validator<Value?>>? customValidators, Set<ValidationType> rules = const {}, List<Value> options = const [], List<Value> disabledOptions = const [], dynamic data, 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 newOption)
→ void
-
-
addOptions(List<Value> newOptions)
→ void
-
-
addRule(ValidationType rule)
→ void
-
inherited
-
addRules(Set<ValidationType> rules)
→ void
-
inherited
-
addValidator(Validator<Value?> validator, {bool forceValidation = false})
→ void
-
inherited
-
addValidators(Set<Validator<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<Value?>> validators, {bool forceValidation = false})
→ void
-
inherited
-
changeValue(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
-
emit(SelectFieldBlocState<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(Value? value, {Set<String? Function(Value?)>? newValidators})
→ String?
-
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onChange(Change<SelectFieldBlocState<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 option)
→ void
-
-
removeOptions(List<Value> options)
→ void
-
-
removeRule(ValidationType rule)
→ void
-
inherited
-
removeRules(Set<ValidationType> rules)
→ void
-
inherited
-
removeValidator(Validator<Value?> validator, {bool forceValidation = false})
→ void
-
inherited
-
removeValidators(Set<Validator<Value?>> validators, {bool forceValidation = false})
→ void
-
inherited
-
reset({bool force = false})
→ void
-
inherited
-
toNullableString()
→ String?
-
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateFormBloc(FormBloc formBloc)
→ void
-
inherited
-
updateInitial(Value? value, {bool forceChange = false})
→ void
-
inherited
-
validate()
→ bool
-
inherited