pushScope static method

Dependencies pushScope(
  1. List<Dependency<Object>> factories
)

Pushes a new dependency scope to the stack and initializes it with the provided factories.

  • factories: A list of dependencies to register in the new scope.

Returns the created Dependencies instance, which represents the active scope.

Implementation

static Dependencies pushScope(
  List<Dependency<Object>> factories,
) {
  final scope = Dependencies._(factories);

  _scopes.add(scope);

  return scope;
}