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(
'Authorizer has not been initialised. '
'Call Authorizer.init<T>() or attach an instance first.',
);
}
if (_i is! Authorizer<T>) {
throw AuthProviderException(
'Type mismatch: expected Authorizer<T> '
'but the attached instance is ${_i.runtimeType}.',
);
}
return _i as Authorizer<T>;
}