2023-01-18 07:54:44 +00:00
|
|
|
part of 'user_bloc.dart';
|
|
|
|
|
|
|
|
abstract class UserState extends Equatable {
|
|
|
|
@override
|
|
|
|
List<Object> get props => [];
|
|
|
|
}
|
|
|
|
|
2023-01-23 03:02:59 +00:00
|
|
|
class UserInitial extends UserState {
|
|
|
|
UserInitial();
|
2023-10-06 12:19:06 +00:00
|
|
|
@override
|
2023-01-23 03:02:59 +00:00
|
|
|
List<Object> get props => [];
|
|
|
|
}
|
2023-01-18 07:54:44 +00:00
|
|
|
|
|
|
|
class UserLoading extends UserState {
|
|
|
|
final String? message;
|
2023-10-06 12:19:06 +00:00
|
|
|
UserLoading({this.message});
|
2023-01-18 07:54:44 +00:00
|
|
|
@override
|
|
|
|
List<Object> get props => [message!];
|
|
|
|
}
|
|
|
|
|
|
|
|
class SplashScreen extends UserState {
|
|
|
|
@override
|
|
|
|
List<Object> get props => [];
|
|
|
|
}
|
|
|
|
|
|
|
|
class UserError extends UserState {
|
|
|
|
final String? message;
|
2023-10-06 12:19:06 +00:00
|
|
|
UserError({this.message});
|
2023-01-18 07:54:44 +00:00
|
|
|
@override
|
|
|
|
List<Object> get props => [];
|
|
|
|
}
|
2023-10-06 12:19:06 +00:00
|
|
|
|
|
|
|
class UserLoggedIn extends UserState {
|
2023-08-11 08:38:26 +00:00
|
|
|
final List<AssignedArea>? estPersonAssignedArea;
|
2023-01-19 05:21:12 +00:00
|
|
|
final UserData? userData;
|
2023-03-21 04:57:38 +00:00
|
|
|
final String? message;
|
|
|
|
final bool? success;
|
2023-04-05 00:54:24 +00:00
|
|
|
final bool? savedCredentials;
|
2023-10-06 12:19:06 +00:00
|
|
|
UserLoggedIn(
|
|
|
|
{this.userData,
|
|
|
|
this.message,
|
|
|
|
this.success,
|
|
|
|
this.savedCredentials,
|
|
|
|
required this.estPersonAssignedArea});
|
2023-01-19 05:21:12 +00:00
|
|
|
}
|
2023-01-18 07:54:44 +00:00
|
|
|
|
|
|
|
class VersionLoaded extends UserState {
|
|
|
|
final VersionInfo? versionInfo;
|
2023-01-24 01:36:51 +00:00
|
|
|
final String? apkVersion;
|
2023-04-13 08:45:19 +00:00
|
|
|
final String? username;
|
|
|
|
final String? password;
|
2023-10-06 12:19:06 +00:00
|
|
|
VersionLoaded(
|
|
|
|
{this.versionInfo, this.apkVersion, this.password, this.username});
|
2023-01-18 07:54:44 +00:00
|
|
|
@override
|
|
|
|
List<Object> get props => [versionInfo!];
|
|
|
|
}
|
2023-10-06 12:19:06 +00:00
|
|
|
|
|
|
|
class UuidLoaded extends UserState {
|
2023-01-23 03:02:59 +00:00
|
|
|
final String uuid;
|
|
|
|
UuidLoaded({required this.uuid});
|
2023-10-06 12:19:06 +00:00
|
|
|
@override
|
2023-01-23 03:02:59 +00:00
|
|
|
List<Object> get props => [uuid];
|
|
|
|
}
|
2023-02-10 02:02:35 +00:00
|
|
|
|
2023-10-06 12:19:06 +00:00
|
|
|
class InternetTimeout extends UserState {
|
2023-02-10 02:02:35 +00:00
|
|
|
final String message;
|
|
|
|
InternetTimeout({required this.message});
|
|
|
|
@override
|
|
|
|
List<Object> get props => [message];
|
|
|
|
}
|
|
|
|
|
2023-10-06 12:19:06 +00:00
|
|
|
class InvalidCredentials extends UserState {
|
|
|
|
final String message;
|
|
|
|
InvalidCredentials({required this.message});
|
2023-02-10 02:02:35 +00:00
|
|
|
}
|
2023-10-06 12:19:06 +00:00
|
|
|
|
|
|
|
class LoginErrorState extends UserState {
|
2023-06-21 00:22:43 +00:00
|
|
|
final String message;
|
|
|
|
LoginErrorState({required this.message});
|
|
|
|
}
|
2023-10-06 04:43:37 +00:00
|
|
|
|
2023-10-06 12:19:06 +00:00
|
|
|
class ErrorWithOfflineMode extends UserState {}
|