scopo library

A set of tools for creating and managing scopes on Flutter. Including dependency injection, asynchronous initialization and disposal.

Classes

AsyncDataScope<T extends Object?> AsyncDataScope
AsyncDataScopeBase<W extends AsyncDataScopeBase<W, T>, T extends Object?> AsyncDataScope
AsyncDataScopeContext<W extends ScopeInheritedWidget, T extends Object?> AsyncDataScope
AsyncDataScopeCore<W extends AsyncDataScopeCore<W, E, T>, E extends AsyncDataScopeElementBase<W, E, T>, T extends Object?> AsyncDataScope
AsyncDataScopeElementBase<W extends AsyncDataScopeCore<W, E, T>, E extends AsyncDataScopeElementBase<W, E, T>, T extends Object?> AsyncDataScope
AsyncDataScopeInitState<P extends Object, T extends Object?> AsyncDataScope
AsyncDataScopeProgress<P extends Object, T extends Object?> AsyncDataScope
AsyncDataScopeReady<P extends Object, T extends Object?> AsyncDataScope
AsyncScope AsyncScope
AsyncScopeBase<W extends AsyncScopeBase<W>> AsyncScope
AsyncScopeContext<W extends ScopeInheritedWidget> AsyncScope
AsyncScopeCoordinator AsyncScope
AsyncScopeCoordinatorEntry
AsyncScopeCore<W extends AsyncScopeCore<W, E>, E extends AsyncScopeElementBase<W, E>> AsyncScope
AsyncScopeElementBase<W extends AsyncScopeCore<W, E>, E extends AsyncScopeElementBase<W, E>> AsyncScope
AsyncScopeError AsyncScope
AsyncScopeInitState AsyncScope
AsyncScopeProgress AsyncScope
AsyncScopeReady AsyncScope
AsyncScopeRoot AsyncScope
AsyncScopeState AsyncScope
AsyncScopeWaiting AsyncScope
CompareUtils
CompositeListenableSubscription
Acts as a container for multiple subscriptions ListenableSubscription that can be canceled at once.
DepHelper
ListenableSelector<L extends Listenable, T extends Object?>
A widget that rebuilds when a value selected from a Listenable changes.
ListenableSelectSubscription<T extends Object?>
A subscription on selected value changes from a Listenable.
ListenableSubscription
A subscription on changes from a Listenable.
ListenableView<T extends Listenable>
LiteScope<W extends LiteScope<W, S>, S extends LiteScopeState<W, S>> LiteScope
A base class for creating lite scopes without dependency management payload.
LiteScopeCore<W extends LiteScopeCore<W, E, S>, E extends LiteScopeElementBase<W, E, S>, S extends LiteScopeCoreState<W, E, S>> LiteScope
A core abstract class for lite scopes, providing minimal dependency injection and state management.
LiteScopeCoreState<W extends LiteScopeCore<W, E, S>, E extends LiteScopeElementBase<W, E, S>, S extends LiteScopeCoreState<W, E, S>>
The core state base class for LiteScopeCore.
LiteScopeElementBase<W extends LiteScopeCore<W, E, S>, E extends LiteScopeElementBase<W, E, S>, S extends LiteScopeCoreState<W, E, S>> LiteScope
The core element base class for LiteScopeCore.
LiteScopeInitState LiteScope
Represents the initialization state of a LiteScope.
LiteScopeProgress LiteScope
Represents the progress state during the initialization of a LiteScope.
LiteScopeReady LiteScope
Represents the ready state of a LiteScope when initialization is complete.
LiteScopeState<W extends LiteScope<W, S>, S extends LiteScopeState<W, S>>
The state implementation for LiteScope.
LiteScopeWaiting LiteScope
Represents the wait state before initialization starts.
Navigation node.
Progress
ProgressIterator
A helper class to track initialization progress as an Progress value.
Scope<W extends Scope<W, D, S>, D extends ScopeDependencies, S extends ScopeState<W, D, S>> Scope
A base class for creating scopes with dependency injection and state management.
ScopeAutoDependencies<T extends ScopeDependencies, C extends Object?> Scope
ScopeAutoDependenciesProgress Scope
ScopeChildEntry AsyncScope
ScopeConfig debug
ScopeContext<W extends ScopeInheritedWidget> base
ScopeCore<W extends ScopeCore<W, E, D, S>, E extends ScopeElementBase<W, E, D, S>, D extends ScopeDependencies, S extends ScopeCoreState<W, E, D, S>> Scope
A core abstract class for scopes, bridging dependency injection with state management.
ScopeCoreState<W extends ScopeCore<W, E, D, S>, E extends ScopeElementBase<W, E, D, S>, D extends ScopeDependencies, S extends ScopeCoreState<W, E, D, S>>
The core state base class for ScopeCore.
ScopeDependencies Scope
A container for dependencies (e.g., repositories, services).
ScopeDependency Scope
ScopeDependencyCancelled Scope
ScopeDependencyCancelledStates Scope
ScopeDependencyDisposalCancelled Scope
ScopeDependencyDisposalFailed Scope
ScopeDependencyDisposed Scope
ScopeDependencyFailed Scope
ScopeDependencyFailedStates Scope
ScopeDependencyGroup Scope
ScopeDependencyInfo
ScopeDependencyInitial Scope
ScopeDependencyInitialized Scope
ScopeDependencyNoDisposalRequred Scope
ScopeDependencyState Scope
ScopeDependencySuccessStates Scope
ScopeElementBase<W extends ScopeCore<W, E, D, S>, E extends ScopeElementBase<W, E, D, S>, D extends ScopeDependencies, S extends ScopeCoreState<W, E, D, S>> Scope
The core element base class for ScopeCore.
ScopeInheritedElement<W extends ScopeInheritedWidget> base
ScopeInheritedWidget base
ScopeInitState<P extends Object, D extends ScopeDependencies> Scope
Represents the initialization state of a Scope.
ScopeLevelLogger
ScopeLog
ScopeLogger
ScopeLogLevel
ScopeModel<M extends Object> ScopeModel
ScopeModelBase<W extends ScopeModelBase<W, M>, M extends Object> ScopeModel
ScopeModelContext<W extends ScopeInheritedWidget, M extends Object> ScopeModel
ScopeModelCore<W extends ScopeModelCore<W, E, M>, E extends ScopeModelElementBase<W, E, M>, M extends Object> ScopeModel
ScopeModelElementBase<W extends ScopeModelCore<W, E, M>, E extends ScopeModelElementBase<W, E, M>, M extends Object> ScopeModel
ScopeModelInheritedElement<W extends ScopeInheritedWidget, M extends Object> ScopeModel
ScopeNotifier<M extends Listenable> ScopeNotifier
ScopeNotifierBase<W extends ScopeNotifierBase<W, M>, M extends Listenable> ScopeNotifier
ScopeNotifierCore<W extends ScopeNotifierCore<W, E, M>, E extends ScopeNotifierElementBase<W, E, M>, M extends Listenable> ScopeNotifier
ScopeNotifierElementBase<W extends ScopeModelCore<W, E, M>, E extends ScopeNotifierElementBase<W, E, M>, M extends Listenable> ScopeNotifier
ScopeProgress<P extends Object, D extends ScopeDependencies> Scope
Represents the progress state during the initialization of a Scope.
ScopeReady<P extends Object, D extends ScopeDependencies> Scope
Represents the ready state of a Scope when initialization is complete.
ScopeState<W extends Scope<W, D, S>, D extends ScopeDependencies, S extends ScopeState<W, D, S>>
The state implementation for Scope.
ScopeStateModel<S extends Object>
ScopeStateModelView<S extends Object>
ScopeStateNotifier<S extends Object>
ScopeStateWithErrorModel<S extends Object>
ScopeStateWithErrorModelView<S extends Object>
ScopeStateWithErrorNotifier<S extends Object>
ScopeWidgetBase<W extends ScopeWidgetBase<W>> ScopeWidget
ScopeWidgetCore<W extends ScopeWidgetCore<W, E>, E extends ScopeWidgetElementBase<W, E>> ScopeWidget
ScopeWidgetElementBase<W extends ScopeWidgetCore<W, E>, E extends ScopeWidgetElementBase<W, E>> ScopeWidget
ScreenshotReplacer
A widget that renders its child once, captures a screenshot of it, and then replaces the child with the captured image.

Extensions

IsBuildingExtension on SchedulerBinding
ListenableListenExtension on Listenable
A helper extension that adds a listen method to Listenable, similar to Stream.listen. It returns a ListenableSubscription that can be easily canceled.
ListenableSelectExtension on L
A helper extension that adds a select method to Listenable. It allows listening to a specific value of the Listenable (selector), triggering the listener only when that value changes.
PreviousNavigatorExtension on NavigatorState
ScopeDependenciesExtension on ScopeDependencies
Extension on ScopeDependencies to provide streaming capabilities.
ScopeDependencyExtension on ScopeDependency

Typedefs

ScopeAutoDependenciesStream<T extends ScopeDependencies> = Stream<ScopeInitState<ScopeAutoDependenciesProgress, T>> Scope
ScopeErrorBuilder<P extends Object> = Widget Function(BuildContext context, Object error, StackTrace stackTrace, P? progress) Scope
A builder function used to display an error widget if scope initialization fails.
ScopeInitBuilder<P extends Object> = Widget Function(BuildContext context, P? progress) Scope
A builder function used to display a widget while the Scope is initializing dependencies.
ScopeInitFunction<P extends Object, D extends ScopeDependencies> = Stream<ScopeInitState<P, D>> Function(BuildContext context) Scope
A function that initializes scope dependencies and yields ScopeInitState updates.
ScopeLogFn = bool Function(Object? message, {Object? error, StackTrace? stackTrace})
ScopeLogFormatter<Out extends Object?> = CustomLogFormatter<ScopeLog, Out>
ScopeLogPublisher = CustomLogPublisher<ScopeLog>
ScopeWaitingBuilder = Widget? Function(BuildContext context) Scope
A builder function used to display a waiting widget while the Scope is waiting for a Scope.scopeKey and Scope.initDependencies to send their first state.

Exceptions / Errors

ScopeDependencyException