StewardContainer class

A rudimentary DI container implementation container bindings are created as needed.

Implemented types

Constructors

StewardContainer()

Properties

bindings Map<String, dynamic>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind<T>(String key, T fn(Container container)) → void
Binds a new DI item into the container The function bound to the provided key will only be called when the container receives a request for the item at that key.
override
clone() StewardContainer
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read<T>(String key) → T?
Generate an item for a given key
override
toString() String
A string representation of this object.
inherited
view(String filename) String?
Load a file from the container TODO: This doesnt feel like the right path forward for this.

Operators

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