JobCubit<T, F> class

Inheritance

Constructors

JobCubit({Future<T> runner()?, required F data, bool isComplete(F)?})

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 error which triggers onError with an optional StackTrace.
inherited
blocBuilder({Key? key, required Widget builder(BuildContext context, JobCubitState<T, F> jobState), BlocBuilderCondition<JobCubitState<T, F>>? buildWhen}) → Widget
build(Widget builder(BuildContext context, JobCubitState<T, F> jobState), {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> jobState)) → 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<T, F>> state) → void
Updates the state to the provided state. emit does nothing if the state being emitted is equal to the current state.
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>, JobCubitState<T, F>)?, 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<JobCubitState<T, F>>> 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
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