mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00

- Removed unused imports and commented-out code - Updated class inheritance for AuthState subclasses - Reorganized code structure for better readability - Cleaned up debug print statements and replaced with dart:developer logs
48 lines
1.0 KiB
Dart
48 lines
1.0 KiB
Dart
part of 'auth_cubit.dart';
|
|
|
|
abstract class AuthState {}
|
|
|
|
class AuthInitial extends AuthState {}
|
|
|
|
//base states
|
|
class AuthLoading extends AuthState {}
|
|
|
|
class AuthError extends AuthState {
|
|
final String message;
|
|
String? code;
|
|
AuthError({required this.message, this.code});
|
|
}
|
|
|
|
class AuthSuccess extends AuthState {}
|
|
|
|
//user log states
|
|
class AuthLoginLoading extends AuthLoading {}
|
|
|
|
class AuthLoginSuccess extends AuthSuccess {}
|
|
|
|
class AuthLoginError extends AuthError {
|
|
AuthLoginError({required super.message, super.code});
|
|
}
|
|
|
|
class AuthLogoutLoading extends AuthLoading {}
|
|
|
|
class AuthLogoutSuccess extends AuthSuccess {}
|
|
|
|
class AuthLogoutError extends AuthError {
|
|
AuthLogoutError({required super.message, super.code});
|
|
}
|
|
|
|
// UI states
|
|
class AuthPasswordVisibilityChanged extends AuthState {}
|
|
|
|
class AuthAgreeToTermsChanged extends AuthState {}
|
|
|
|
//token states
|
|
class AuthTokenLoading extends AuthLoading {}
|
|
|
|
class AuthTokenSuccess extends AuthSuccess {}
|
|
|
|
class AuthTokenError extends AuthError {
|
|
AuthTokenError({required super.message, super.code});
|
|
}
|