FormBloc<SuccessResponse, FailureResponse> class
Properties
- customSubmit → bool
-
final
-
fields
→ Map<
String, FieldBloc< FieldBlocStateBase> > -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isClosed → bool
-
Whether the bloc is closed.
no setterinherited
- isCreating → bool
-
no setter
- isEditing → bool
-
no setter
- isNotValid → bool
-
no setter
- isValid → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
→ FormBlocState<
SuccessResponse, FailureResponse> -
The current state.
no setterinherited
-
statusStream
↔ Stream<
FormStatus> -
getter/setter pair
-
stream
→ Stream<
FormBlocState< SuccessResponse, FailureResponse> > -
The current stream of states.
no setterinherited
-
subscriptions
↔ List<
StreamSubscription> -
getter/setter pair
Methods
-
addError(
Object error, [StackTrace? stackTrace]) → void -
Reports an
errorwhich triggersonErrorwith an optional StackTrace.inherited -
addField(
FieldBloc< FieldBlocStateBase> field) → void -
addFields(
Iterable< FieldBloc< fields) → voidFieldBlocStateBase> > -
addSubscription(
StreamSubscription subscription) → void -
addSubscriptions(
Iterable< StreamSubscription> subscriptions) → void -
cancel(
) → FutureOr< void> -
cancelAllSubscriptions(
) → void -
clear(
) → FutureOr< void> -
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.
-
emit(
FormBlocState< SuccessResponse, FailureResponse> state) → void -
Updates the
stateto the providedstate.emitdoes nothing if thestatebeing emitted is equal to the currentstate.inherited -
emitCancelled(
) → void -
emitFailure(
[FailureResponse? error]) → void -
emitInitial(
) → void -
emitLoading(
) → void -
emitSuccess(
SuccessResponse response) → void -
initialize(
{Map< String, dynamic> ? params}) → FutureOr<void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onCancel(
) → FutureOr< void> -
onChange(
Change< FormBlocState< change) → voidSuccessResponse, FailureResponse> > -
Called whenever a
changeoccurs with the givenchange. Achangeoccurs when a newstateis emitted.onChangeis called before thestateof thecubitis updated.onChangeis a great spot to add logging/analytics for a specificcubit.inherited -
onError(
Object error, StackTrace stackTrace) → void -
Called whenever an
erroroccurs and notifiesBlocObserver.onError.inherited -
onInitialize(
Map< String, dynamic> params) → FutureOr<void> -
onSubmit(
) → FutureOr< void> -
removeField(
FieldBloc< FieldBlocStateBase> field) → void -
removeFields(
Iterable< FieldBloc< fields) → voidFieldBlocStateBase> > -
reset(
) → FutureOr< void> -
submit(
) → FutureOr< void> -
toString(
) → String -
A string representation of this object.
inherited
-
validate(
) → FutureOr< void>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited