ProviderForest class

Represents the dependency injection hierarchy of a view.

This may closely resemble the template structure, as any element that contributes a provider is represented by a ProviderNode; however, any element without a provider is omitted.

Isolating the provider hierarchy like this allows us to optimize it independently from view construction.

Note that since a view may have multiple root nodes, so may it's dependency injection hierarchy, and thus this is technically a forest (consisting of multiple independently rooted trees) in data-structure parlance.

Constructors

ProviderForest.from(Iterable<ProviderNode> roots)
Creates a forest of providers from a copy of roots.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build() List<Statement>
Returns statements for querying the dependency injection hierarchy.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

expandEmptyNodes(List<ProviderNode> nodes) Iterable<ProviderNode>
Recursively replaces any empty nodes with their children.