Provider<T> class
A standard provider that creates instances using a factory function. This is the most common type of provider in the hybrid_manager system.
- Inheritance
-
- Object
- BaseProvider<
T> - Provider
Constructors
- Provider.new(T _creator(), {bool singleton = false})
-
Creates a provider with a factory function.
If
singleton
is true, the created instance will be cached. - Provider.value(T value)
- Creates a provider that always returns the given value.
Properties
Methods
-
create(
) → T -
Creates an instance of type T.
override
-
dispose(
) → void -
Optional cleanup method that can be overridden by subclasses.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
ref(
) → ProviderRef< T> - Creates a provider reference for this provider.
-
scoped(
) → ScopedProvider< T> - Creates a scoped version of this provider.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited