EndScopeUseCase class

Use case to end a scope (triggers cleanup sequence).

Inheritance

Constructors

EndScopeUseCase()

Properties

bloc ↔ ScopeLifecycleBloc
Reference to the bloc that owns this use case. Set automatically by the framework via setBloc.
getter/setter pairinherited
emitCancel ↔ void Function({Map<String, dynamic>? aviatorArgs, String? aviatorName, Set<String>? groupsToRebuild, BlocState? newState})
Emits a cancellation state to indicate the operation was cancelled.
getter/setter pairinherited
emitEvent ↔ void Function({EventBase? event})
Emits a raw event without changing state.
getter/setter pairinherited
emitFailure ↔ void Function({Map<String, dynamic>? aviatorArgs, String? aviatorName, Object? error, StackTrace? errorStackTrace, Set<String>? groupsToRebuild, BlocState? newState})
Emits a failure state to indicate operation failure.
getter/setter pairinherited
emitUpdate ↔ void Function({Map<String, dynamic>? aviatorArgs, String? aviatorName, Set<String>? groupsToRebuild, BlocState? newState, bool skipIfSame})
Emits an update state to indicate successful operation completion.
getter/setter pairinherited
emitWaiting ↔ void Function({Map<String, dynamic>? aviatorArgs, String? aviatorName, Set<String>? groupsToRebuild, BlocState? newState})
Emits a waiting state to indicate operation in progress.
getter/setter pairinherited
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
useCaseName ↔ String
Name of the use case, automatically set from the runtime type
latefinalinherited

Methods

close() → void
Performs cleanup when the use case is no longer needed.
inherited
execute(EndScopeEvent event) → Future<void>
Execute the use case logic for the given event.
override
guardEntity<K, T>(K key, {required EntityStatuses<K> read(ScopeLifecycleBloc bloc), required BlocState write(EntityStatuses<K> statuses), required Future<T> action(), Set<String>? groupsToRebuild, bool rethrowOnError = false}) → Future<T?>
Runs action while tracking a single entity's async status in your state, guaranteeing the entity is set to waiting before, idle after — or failure if action throws (cleanup happens even on error, killing the stuck-spinner footgun). The per-entity analogue of the emitWaiting → emitUpdate/emitFailure lifecycle.
inherited
log(String message, {Level level = Level.info, Map<String, dynamic>? context}) → void
Logs a message with the use case name as prefix.
inherited
logError(Object error, StackTrace stackTrace, {Map<String, dynamic>? context}) → void
Logs an error with stack trace and use case name as prefix.
inherited
logState(String stateDescription, {Map<String, dynamic>? context}) → void
Logs the current state with the use case name as prefix.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setBloc(JuiceBloc<BlocState> blocInstance) → void
Sets the bloc reference for this use case.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited