-
-
Save red-star25/378729c86c38efcefade2560ce5b14cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
part of 'auth_bloc.dart'; | |
@immutable | |
abstract class AuthState extends Equatable {} | |
// When the user presses the signin or signup button the state is changed to loading first and then to Authenticated. | |
class Loading extends AuthState { | |
@override | |
List<Object?> get props => []; | |
} | |
// When the user is authenticated the state is changed to Authenticated. | |
class Authenticated extends AuthState { | |
@override | |
List<Object?> get props => []; | |
} | |
// This is the initial state of the bloc. When the user is not authenticated the state is changed to Unauthenticated. | |
class UnAuthenticated extends AuthState { | |
@override | |
List<Object?> get props => []; | |
} | |
// If any error occurs the state is changed to AuthError. | |
class AuthError extends AuthState { | |
final String error; | |
AuthError(this.error); | |
@override | |
List<Object?> get props => [error]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment