JobCubit<T, F> class
- Inheritance
-
- Object
- SimpleValueCubit<
JobCubitState< T, F> > - JobCubit
Properties
- data → F
-
no setter
- errorMessage → String
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isClosed → bool
-
Whether the bloc is closed.
no setterinherited
- isFailed → bool
-
no setter
- isInProgress → bool
-
no setter
- isNotFailed → bool
-
no setter
- isNotInProgress → bool
-
no setter
- isNotReady → bool
-
no setter
- isNotSuccess → bool
-
no setter
- isReady → bool
-
no setter
- isSuccess → bool
-
no setter
- isTerminal → bool
-
no setter
-
key
→ ValueKey<
String> -
final
-
listable
→ ValueListenable<
JobCubitState< T, F> > -
no setterinherited
-
runner
→ Future<
T> Function()? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
→ SimpleValue<
JobCubitState< T, F> > -
The current state.
no setterinherited
-
stream
→ Stream<
SimpleValue< JobCubitState< >T, F> > -
The current stream of states.
no setterinherited
-
value
↔ JobCubitState<
T, F> -
getter/setter pairinherited
Methods
-
addError(
Object error, [StackTrace? stackTrace]) → void -
Reports an
errorwhich triggersonErrorwith an optional StackTrace.inherited -
blocBuilder(
{Key? key, required Widget builder(BuildContext context, JobCubitState< T, F> jobState), BlocBuilderCondition<JobCubitState< ? buildWhen}) → WidgetT, F> > -
build(
Widget builder(BuildContext context, JobCubitState< T, F> value), {bool when(JobCubitState<T, F> , JobCubitState<T, F> )?}) → Widget -
inherited
-
buildAs<
Z> (Widget builder(BuildContext context, Z value), {bool when(JobCubitState< T, F> , JobCubitState<T, F> )?}) → Widget -
inherited
-
buildIfNotEqual(
Widget builder(BuildContext context, JobCubitState< T, F> value)) → Widget -
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(
SimpleValue< JobCubitState< state) → voidT, F> > -
Updates the
stateto the providedstate.emitdoes nothing if thestatebeing emitted is equal to the currentstate.inherited -
exec(
) → Future< JobResult< F> > -
fromContext(
BuildContext context, {bool listen = true}) → SimpleValueCubit< JobCubitState< T, F> > -
inherited
-
loader(
Widget builder(BuildContext context, JobCubitState< T, F> jobState), {VoidCallback? runner, bool when(JobCubitState<T, F> , JobCubitState<T, F> )?, WidgetBuilder? placeholder, bool provide = false, bool noRetryAppBar = false, void onSuccess(T)?, VoidCallback? onFailure, VoidCallback? onRetry}) → Widget -
loaderV2(
Widget builder(BuildContext context, T data), {Future< T> runner()?, bool when(JobCubitState<T, F> previousState, JobCubitState<T, F> currentState)?, WidgetBuilder? placeholder, bool provide = false, bool noRetryAppBar = false, void onSuccess(T)?, VoidCallback? onFailure, VoidCallback? onRetry, JobErrorBuilder? errorPlaceholder, bool isSliver = false, bool animateTransitions = true}) → Widget -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onChange(
Change< SimpleValue< change) → voidJobCubitState< >T, F> > -
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 -
reset(
) → void -
run(
Future< T> runner()) → Future<JobResult< F> > -
setFailed(
String message) → void -
setFetching(
) → void -
setSuccess(
T data) → void -
setValue(
JobCubitState< T, F> value) → void -
inherited
-
stateBuilder(
{required WidgetBuilder builder, Widget failed(BuildContext context, String message)?, WidgetBuilder? success, WidgetBuilder? fetching, Key? key}) → Widget -
toString(
) → String -
A string representation of this object.
inherited
-
update(
JobCubitState< T, F> predicate(JobCubitState<T, F> value)) → void -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited