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

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

hashCode int
The hash code for this object.
no setterinherited
id String
Gets a unique identifier for this provider.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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