getAll<T extends Object> abstract method

Iterable<T> getAll<T extends Object>({
  1. dynamic param1,
  2. dynamic param2,
  3. bool fromAllScopes = false,
  4. String? onlyInScope,
})

The returned Iterable will then contain all registered instances of the requested interface T with or without an instance name. if the registrations are factories they will each be called with the provided parameters param1,param2 and the results will be returned in the Iterable.

Scope Parameters:

  • Default (no params): searches current scope only
  • fromAllScopes: if true, searches all scopes
  • onlyInScope: searches only the named scope (takes precedence over fromAllScopes)

Throws StateError if onlyInScope scope doesn't exist.

Implementation

Iterable<T> getAll<T extends Object>({
  dynamic param1,
  dynamic param2,
  bool fromAllScopes = false,
  String? onlyInScope,
});