resolve<T> method

T resolve<T>(
  1. ZenithKey<T> key
)

Resolves the value for key from this scope's container.

Implementation

T resolve<T>(ZenithKey<T> key) {
  final node = container.maybeNode<T>(key);
  if (node == null) {
    throw StateError('Key $key not found in scope "$id"');
  }
  return node.value;
}