lite_ref library
A lightweight dependency injection package.
Classes
-
AsyncSingletonRef<
T> - A AsyncSingletonRef is a reference with an asynchronous factory/creation function that always return the same instance.
-
AsyncTransientRef<
T> - A AsyncTransientRef is a reference with an asynchronous factory/creation function that always return a new instance.
- Disposable
- An abstract class that provides a contract for disposing resources.
-
IScopedRef<
T> - A ScopedRef is a reference that needs a context to access the instance.
- LiteRefScope
- Dependency injection of ScopedRefs.
- Ref
- abstract class for creating refs.
-
ScopedFamilyRef<
T, F> - A ScopedFamilyRef is a reference that needs a context to access instances.
-
ScopedObject<
T> -
A ScopedObject is a reference that holds an instance of
T. -
ScopedRef<
T> - A ScopedRef is a reference that needs a context to access the instance.
-
SingletonRef<
T> - A SingletonRef is a reference that always returns a new instance.
-
TransientRef<
T> - A TransientRef is a reference that always return a new instance.
Typedefs
-
AsyncFactory<
T> = Future< T> Function() -
A function that creates an instance of
Tasynchronousloy. -
CtxCreateFn<
T> = T Function(BuildContext context) -
The function used to create an instance of
T. -
CtxFamilyCreateFn<
T, F> = T Function(BuildContext context, F family) -
The function used to create an instance of
Twith a familyF. -
DisposeFn<
T> = void Function(T) - The function called when the IScopedRef is disposed.