getDependency<T> method

  1. @Deprecated('Use .get instead.')
T getDependency<T>()

Gets dependency by type T.

Implementation

@Deprecated('Use .get instead.')
T getDependency<T>() {
  final dep = get<T>();
  if (dep != null) {
    return dep;
  }
  throw StateError('The $T dependency could not be found');
}