AuthenticationBloc constructor
Implementation
AuthenticationBloc({
required this.authenticationRepository,
required this.getUserUseCase,
required this.logOutUseCase,
}) : super(AuthenticationState()) {
on<_Started>(_onStarted);
on<_AuthenticationStatusChanged>(_onAuthenticationStatusChanged);
on<_LogoutButtonPressed>(_onLogoutButtonPressed);
_authenticationStatusSubscription = authenticationRepository.status.listen(
(AuthenticationStatus status) => add(
_AuthenticationStatusChanged(status: status),
),
);
}