ScopeModule<Container extends BaseScopeContainer> class abstract

This class helps to decompose ScopeContainer into a number of features.

For example we want to extract all monitoring entities into a separate feature:

class SomeScopeContainer extends ScopeContainer { // We declare ScopeModule inside it's ScopeContainer late final monitorScopeModule = MonitorScopeModule(this);

late final appManagerDep = dep(() => AppManager());

late final navigationDep = dep(() => Navigation()); }

class MonitorScopeModule extends ScopeModule

late final reporterDep = dep(() => Reporter());

late final loggerDep = dep(() => Logger()); }

Constructors

ScopeModule(Container container)
const

Properties

container → Container
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

asyncDep<Value extends AsyncLifecycle>(DepBuilder<Value> builder, {String? name}) AsyncDep<Value>
dep<Value>(DepBuilder<Value> builder, {String? name}) Dep<Value>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rawAsyncDep<Value>(DepBuilder<Value> builder, {required AsyncDepCallback<Value> init, required AsyncDepCallback<Value> dispose, String? name}) AsyncDep<Value>
toString() String
A string representation of this object.
inherited

Operators

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