instanceOf<T extends Auth<AuthKeys>> static method

Authorizer<T> instanceOf<T extends Auth<AuthKeys>>()

Implementation

static Authorizer<T> instanceOf<T extends Auth>() {
  if (_i == null) {
    throw AuthProviderException(
      "You should initialize Authorizer before calling Authorizer.instanceOf<$T>();",
    );
  }
  if (_i is! Authorizer<T>) {
    throw AuthProviderException(
      "You should call like Authorizer.instanceOf<${Authorizer.type}>();",
    );
  }
  return _i as Authorizer<T>;
}