injectAuthMock method Null safety

void injectAuthMock(
  1. IAuth<T, P> fakeRepository(
      )?
    )

    Inject a fake implementation of this injected model.

    Use Injected.injectMock to directly mack a signed user.

    Implementation

    void injectAuthMock(IAuth<T, P> Function()? fakeRepository) {
      dispose();
      RM.disposeAll();
      if (fakeRepository == null) {
        _cachedRepoMocks
          ..clear()
          ..add(null);
      }
      _cachedRepoMocks.add(fakeRepository);
    }