TenantBloc constructor

TenantBloc({
  1. PortalAuthenticationRepository? portalRepo,
})

Constructs an instance of TenantBloc with a dependency-injected repository.

This allows better testability by injecting a mock or different repository in tests.

Implementation

TenantBloc({PortalAuthenticationRepository? portalRepo})
    : portalRepo = portalRepo ?? PortalAuthenticationRepository(),
      super(TenantInitial()) {
  on<TenantInitialEvent>(_onTenantInitial);
  on<TenantLoadingEvent>(_onTenantLoading);
  on<TenantLoadedEvent>(_onTenantLoaded);
}