FormBlocState<SuccessResponse, FailureResponse> class

The base class for all Form Bloc States:

Inheritance
Implementers

Constructors

FormBlocState({Map<int, bool> isValidByStep, @required bool isEditing, Map<int, Map<String, FieldBloc>> fieldBlocs, @required int currentStep})

Properties

canSubmit bool
Returns true if the state is FormBlocLoaded or FormBlocFailure or FormBlocSubmissionCancelled or FormBlocSubmissionFailed or FormBlocDeleteFailed or FormBlocSuccess.canSubmitAgain or is ( FormBlocSuccess and not is in the last step ).
read-only
currentStep int
final
hashCode int
The hash code for this object. [...]
read-only, inherited
isEditing bool
It is usually used in forms that are used as CRUD, so when it is true it means that you can perform the update operation.
final
isFirstStep bool
read-only
isLastStep bool
read-only
lastStep int
read-only
notValidStep int
read-only
numberOfSteps int
read-only
props List<Object>
The list of properties that will be used to determine whether two instances are equal.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
stringify bool
If set to true, the toString method will be overridden to output this instance's props. [...]
read-only, inherited

Methods

booleanFieldBlocOf<ExtraData>(String name) BooleanFieldBloc<ExtraData>
contains(FieldBloc fieldBloc) bool
Returns true if the FormBloc contains fieldBloc
fieldBlocs([int step]) Map<String, FieldBloc>
groupFieldBlocOf(String name) GroupFieldBloc
inputFieldBlocOf<Value, ExtraData>(String name) InputFieldBloc<Value, ExtraData>
isValid([int step]) bool
listFieldBlocOf<T extends FieldBloc>(String name) ListFieldBloc<T>
multiSelectFieldBlocOf<Value, ExtraData>(String name) MultiSelectFieldBloc<Value, ExtraData>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
selectFieldBlocOf<Value, ExtraData>(String name) SelectFieldBloc<Value, ExtraData>
textFieldBlocOf<ExtraData>(String name) TextFieldBloc<ExtraData>
toDeleteFailed({FailureResponse failureResponse}) FormBlocState<SuccessResponse, FailureResponse>
Returns a FormBlocDeleteFailed state with the properties of the current state. [...]
toDeleteSuccessful({SuccessResponse successResponse}) FormBlocState<SuccessResponse, FailureResponse>
Returns a FormBlocDeleteSuccessful state with the properties of the current state. [...]
toFailure({FailureResponse failureResponse}) FormBlocState<SuccessResponse, FailureResponse>
Returns a FormBlocFailure state with the properties of the current state. [...]
toJson([int step]) Map<String, dynamic>
toLoaded() FormBlocState<SuccessResponse, FailureResponse>
Returns a FormBlocLoaded state with the properties of the current state. [...]
toLoadFailed({FailureResponse failureResponse}) FormBlocState<SuccessResponse, FailureResponse>
Returns a FormBlocLoadFailed state with the properties of the current state. [...]
toLoading({double progress}) FormBlocState<SuccessResponse, FailureResponse>
Returns a FormBlocLoading state with the properties of the current state. [...]
toString() String
Returns a string representation of this object.
override
toSubmissionCancelled() FormBlocState<SuccessResponse, FailureResponse>
Returns a FormBlocSubmissionCancelled state with the properties of the current state. [...]
toSubmitting({double progress}) FormBlocState<SuccessResponse, FailureResponse>
Returns a FormBlocSubmitting state with the properties of the current state. [...]
toSuccess({SuccessResponse successResponse, bool canSubmitAgain = false, bool isEditing}) FormBlocState<SuccessResponse, FailureResponse>
Returns a FormBlocSuccess state with the properties of the current state. [...]
toUpdatingFields({double progress}) FormBlocState<SuccessResponse, FailureResponse>
Returns a FormBlocUpdatingFields state with the properties of the current state. [...]
valueListOf<T>(String name) List<T>
valueMapListOf<T>(String name) List<Map<String, T>>
valueMapOf<T>(String name) Map<String, T>
valueOf<T>(String name) → T
Returns the value of FieldBloc that has this name.

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited