Initial commit: Uruk Prize Platform architecture, backend core, mobile app, gateway caller & deployment pipeline
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
abstract class AuthState extends Equatable {
|
||||
const AuthState();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
class AuthInitial extends AuthState {}
|
||||
|
||||
class AuthLoading extends AuthState {}
|
||||
|
||||
class AuthOtpSent extends AuthState {
|
||||
final String phone;
|
||||
final String? mockOtp;
|
||||
|
||||
const AuthOtpSent({required this.phone, this.mockOtp});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [phone, mockOtp];
|
||||
}
|
||||
|
||||
class Authenticated extends AuthState {
|
||||
final Map<String, dynamic> user;
|
||||
final String token;
|
||||
final String deviceFingerprint;
|
||||
|
||||
const Authenticated({
|
||||
required this.user,
|
||||
required this.token,
|
||||
required this.deviceFingerprint,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [user, token, deviceFingerprint];
|
||||
}
|
||||
|
||||
class Unauthenticated extends AuthState {}
|
||||
|
||||
class AuthFailure extends AuthState {
|
||||
final String errorMessage;
|
||||
|
||||
const AuthFailure(this.errorMessage);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [errorMessage];
|
||||
}
|
||||
Reference in New Issue
Block a user