flutter_sputnik_di library
Classes
-
ClearableDependency<
T> - An interface for dependencies that support clearing their stored instances.
-
Dependency<
T> -
A standard dependency wrapper that manages an instance of type
T
. It supports lazy initialization and caching. - DepsNode
- A base class for managing lifecycle-bound dependencies.
-
DepsNodeBinder<
T extends DepsNode> - A widget that binds a DepsNode instance to the widget tree.
-
DepsNodeBuilder<
T extends DepsNode> - A widget that builds different UI states based on the status of a DepsNode.
- Lifecycle
- The abstract class Lifecycle defines methods for initialization and resource cleanup, which must be implemented by subclasses.
- MultiDepsNodeBinder
- A widget that allows multiple DepsNodeBinder widgets to be included as children.
- RawLifecycle
- A basic implementation of the Lifecycle interface.
-
SingletonFactoryDependency<
T, Param> -
A dependency wrapper that creates and stores singleton instances based on a parameter.
Each parameter value corresponds to a unique instance of
T
. -
StateHolder<
T> -
A base class that holds and manages a state of type
T
, providing a stream of state changes. -
StateHolderBuilder<
Holder extends StateHolder< T> , T> - A widget that rebuilds based on the state of a StateHolder.
-
StateHolderListener<
T extends StateHolder< R> , R> - A widget that listens to the state changes of a StateHolder and calls a listener function.
Enums
- DepsNodeStatus
- Represents the possible statuses of a DepsNode.
Extensions
- DepsNodeBuildContextEx on BuildContext
- Extension on BuildContext to retrieve the DepsNode instance using the DepsNodeBinder.of method.
Typedefs
-
DependencyCreator<
T> = T Function() -
A function type definition for creating a dependency instance of type
T
. -
LifecycleDependency
= Dependency<
Lifecycle> - A function type representing a dependency that implements Lifecycle.
-
SingletonFactoryCreator<
T, Param> = T Function(Param param) -
A function type definition for creating a singleton factory instance of type
T
with a parameter of typeParam
.