bind method

void bind(
  1. String key,
  2. dynamic fn(
    1. Container
    )
)

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.

Implementation

void bind(String key, dynamic Function(Container) fn) {
  bindings[key] = fn;
}