FactoryRef class final
A top-level function that creates a value, such as
createFirebaseAnalyticsService, and the services it takes.
The function takes one positional argument per entry of deps, in that
order, which the DI container resolves (see DiRegistration). A factory
without deps takes no arguments.
- Annotations
-
- @immutable
Constructors
-
FactoryRef(String name, {required ImportRef import, List<
ServiceRef> deps = const []}) -
Refers to the factory
namedeclared byimport, which takesdeps.const
Properties
- code → String
-
The function as code refers to it: name, after the prefix of
import if it has one.
no setter
-
deps
→ List<
ServiceRef> -
The services the function takes, in the order of its parameters.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- import → ImportRef
-
The import that declares the function.
final
- name → String
-
The name of the function.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
codeWith(
String? prefix) → String -
The function as code that imports its file with
prefixrefers to it. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
problems(
) → List< String> - Describes what is wrong with this reference, or returns an empty list.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited