27 lines
591 B
Dart
27 lines
591 B
Dart
part of 'auth_bloc.dart';
|
|
|
|
enum AuthStatus { initial, loading, success, failure }
|
|
|
|
class AuthState extends Equatable {
|
|
const AuthState({
|
|
required this.status,
|
|
this.error,
|
|
required this.isLoginMode,
|
|
});
|
|
|
|
final AuthStatus status;
|
|
final String? error;
|
|
final bool isLoginMode;
|
|
|
|
@override
|
|
List<Object?> get props => [status, error, isLoginMode];
|
|
|
|
AuthState copyWith({AuthStatus? status, String? error, bool? isLoginMode}) {
|
|
return AuthState(
|
|
status: status ?? this.status,
|
|
error: error,
|
|
isLoginMode: isLoginMode ?? this.isLoginMode,
|
|
);
|
|
}
|
|
}
|