get<T extends Object> static method

T get<T extends Object>({
  1. bool newInstance = false,
  2. bool scoppedNewInstance = false,
})

Implementation

static T get<T extends Object>(
    {bool newInstance = false, bool scoppedNewInstance = false}) {
  try {
    return getByType(T,
        newInstance: newInstance,
        scoppedNewInstance: scoppedNewInstance) as T;
  } on Exception catch (e) {
    throw e;
  }
}