dimeGetAsync<T> function

FutureOr<T> dimeGetAsync<T>({
  1. String? tag,
})

Fetches a Future of the type T with optional tag identifier tag.

Implementation

FutureOr<T> dimeGetAsync<T>({String? tag}) async {
  var instance = _rootScope.get<Future<T>>(tag: tag);
  if (instance == null) {
    throw DimeException.factoryNotFound(type: T);
  } else {
    return instance;
  }
}