first commit
This commit is contained in:
32
lib/modules/auth/login/bloc/login_state.dart
Normal file
32
lib/modules/auth/login/bloc/login_state.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:frontend_eccp_mobile/app/core/constants/enum/snackbar_type_enum.dart';
|
||||
|
||||
abstract class LoginState extends Equatable {
|
||||
const LoginState();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
class LoginInitial extends LoginState {}
|
||||
|
||||
class LoginLoading extends LoginState {}
|
||||
|
||||
class LoginSuccess extends LoginState {}
|
||||
|
||||
class LoginFailure extends LoginState {
|
||||
const LoginFailure([
|
||||
this.message,
|
||||
this.snackBarType = SnackBarType.error,
|
||||
this.duration = 2000,
|
||||
]);
|
||||
|
||||
final String? message;
|
||||
final SnackBarType snackBarType;
|
||||
final int duration;
|
||||
|
||||
bool get hasMessage => message != null && message!.isNotEmpty;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [message, snackBarType, duration];
|
||||
}
|
||||
Reference in New Issue
Block a user