T&C #1
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import '../../../data/models/user.dart';
|
||||
import 'package:kmobile/data/models/user.dart';
|
||||
import 'package:kmobile/features/auth/models/auth_token.dart';
|
||||
|
||||
abstract class AuthState extends Equatable {
|
||||
const AuthState();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
class AuthInitial extends AuthState {}
|
||||
@@ -12,20 +15,37 @@ class AuthLoading extends AuthState {}
|
||||
|
||||
class Authenticated extends AuthState {
|
||||
final List<User> users;
|
||||
|
||||
Authenticated(this.users);
|
||||
const Authenticated(this.users);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [users];
|
||||
List<Object> get props => [users];
|
||||
}
|
||||
|
||||
class Unauthenticated extends AuthState {}
|
||||
|
||||
class AuthError extends AuthState {
|
||||
final String message;
|
||||
|
||||
AuthError(this.message);
|
||||
const AuthError(this.message);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [message];
|
||||
List<Object> get props => [message];
|
||||
}
|
||||
|
||||
// --- New States for Navigation and Dialog ---
|
||||
|
||||
// State to indicate that the TNC dialog needs to be shown
|
||||
class ShowTncDialog extends AuthState {
|
||||
final AuthToken authToken;
|
||||
final List<User> users;
|
||||
const ShowTncDialog(this.authToken, this.users);
|
||||
|
||||
@override
|
||||
List<Object> get props => [authToken, users];
|
||||
}
|
||||
|
||||
// States to trigger specific navigations from the UI
|
||||
class NavigateToTncRequiredScreen extends AuthState {}
|
||||
|
||||
class NavigateToMpinSetupScreen extends AuthState {}
|
||||
|
||||
class NavigateToDashboardScreen extends AuthState {}
|
||||
Reference in New Issue
Block a user