form_bloc
library
Classes
BooleanFieldBloc <ExtraData >
A FieldBloc
used for bool
type.
BooleanFieldBlocState <ExtraData >
FieldBlocState <Value , Suggestion , ExtraData >
FieldBlocValidators
FieldBlocValidatorsErrors
FormBloc <SuccessResponse , FailureResponse >
The base class for all FormBlocs
.
FormBlocDeleteFailed <SuccessResponse , FailureResponse >
It is the state when the form are deleting and fail.
The previous state must be FormBlocDeleting .
FormBlocDeleteSuccessful <SuccessResponse , FailureResponse >
It is the state when the form is deleted successfully.
The previous state must be FormBlocDeleting .
FormBlocDeleting <SuccessResponse , FailureResponse >
It is the state when FormBloc.delete is called.
FormBlocFailure <SuccessResponse , FailureResponse >
It is the state when the form are submitting and fail.
The previous state must be FormBlocSubmitting .
FormBlocLoaded <SuccessResponse , FailureResponse >
It is the state when you can submit
the FormBloc .
FormBlocLoadFailed <SuccessResponse , FailureResponse >
It is the state when you failed to pre/fill the
fieldBlocs
. The previous state must be FormBlocLoading .
FormBlocLoading <SuccessResponse , FailureResponse >
It is the state when you need to pre/fill the
fieldBlocs
usually with asynchronous data.
The previous state must be FormBlocLoading .
FormBlocObserver
FormBlocObserver hide events
and transitions
of any FieldBloc or FormBloc
from the child .
FormBlocState <SuccessResponse , FailureResponse >
The base class for all Form Bloc States:
FormBlocSubmissionCancelled <SuccessResponse , FailureResponse >
It is the state that you must yield last in the method
FormBloc.onCancelingSubmission .
The previous state must be FormBlocSubmitting .
FormBlocSubmissionFailed <SuccessResponse , FailureResponse >
It is the state when the FormBlocState._isValidByStep
is false
and FormBloc.submit is called.
FormBlocSubmitting <SuccessResponse , FailureResponse >
It is the state when the FormBloc is submitting.
It is called automatically when FormBloc.submit
is called successfully, and usually is used to
update the submission progress.
FormBlocSuccess <SuccessResponse , FailureResponse >
It is the state when the form is submitted successfully.
The previous state must be FormBlocSubmitting .
FormBlocUpdatingFields <SuccessResponse , FailureResponse >
It is the state when the form is updating the fields.
GroupFieldBloc <T extends FieldBloc <FieldBlocStateBase > , ExtraData >
GroupFieldBlocState <T extends FieldBloc <FieldBlocStateBase > , ExtraData >
InputFieldBloc <Value , ExtraData >
A FieldBloc
used for any type, for example DateTime
or File
.
InputFieldBlocState <Value , ExtraData >
ListFieldBloc <T extends FieldBloc <FieldBlocStateBase > , ExtraData >
ListFieldBlocState <T extends FieldBloc <FieldBlocStateBase > , ExtraData >
MultiFieldBloc <ExtraData , TState extends MultiFieldBlocState <ExtraData > >
MultiFieldBlocState <ExtraData >
MultiSelectFieldBloc <Value , ExtraData >
A FieldBloc
used to select multiple items
from multiple items.
MultiSelectFieldBlocState <Value , ExtraData >
SelectFieldBloc <Value , ExtraData >
A FieldBloc
used to select one item
from multiple items.
SelectFieldBlocState <Value , ExtraData >
SingleFieldBloc <Value , Suggestion , State extends FieldBlocState <Value , Suggestion , ExtraData > , ExtraData >
The base class with the common behavior
of all single field blocs:
TextFieldBloc <ExtraData >
A FieldBloc
used for String
type, but generally
it is also used to obtain int
and double
values
of texts thanks to the methods
valueToInt and valueToDouble .
TextFieldBlocState <ExtraData >
ValidationStatus
Typedefs
AsyncValidator <Value >
= Future <Object ? > Function(Value value )
Signature for the AsyncValidator function which takes value
and should returns a Object
error, and if doesn't have error
should return null
.
Suggestions <Value >
= Future <List <Value > > Function(String pattern )
Signature for the Suggestions function which takes pattern
and should returns a Future
with a List<Value>
.
Validator <Value >
= Object ? Function(Value value )
Signature for the Validator function which takes value
and should returns a Object
error, and if doesn't have error
should return null
.