getRepoAs<R extends IAuth<T, P>> method

R getRepoAs<R extends IAuth<T, P>>()

Get the auth repository of type R

Implementation

R getRepoAs<R extends IAuth<T, P>>() {
  if (_repo != null) {
    return _repo as R;
  }
  final repoMock = _cachedRepoMocks.last;
  _repo = repoMock != null
      ? repoMock()
      : (this as InjectedAuthImp<T, P>).repoCreator();
  return _repo as R;
}