This commit is contained in:
efrilm
2025-09-18 07:16:56 +07:00
parent b20854f329
commit 3b26b19b25
17 changed files with 1672 additions and 0 deletions
+14
View File
@@ -9,6 +9,7 @@ part 'entities/check_phone_entity.dart';
part 'entities/register_entity.dart';
part 'entities/verify_entity.dart';
part 'entities/login_entity.dart';
part 'entities/resend_entity.dart';
part 'failures/auth_failure.dart';
part 'repositories/i_auth_repository.dart';
@@ -24,3 +25,16 @@ extension CheckPhoneStatusX on CheckPhoneStatus {
bool get isNotRegistered => this == CheckPhoneStatus.notRegistered;
bool get isPasswordRequired => this == CheckPhoneStatus.passwordRequired;
}
enum ResendStatus { resendNotAllowed, success, unknown }
extension ResendStatusX on ResendStatus {
String toStringType() => switch (this) {
ResendStatus.resendNotAllowed => 'RESEND_NOT_ALLOWED',
ResendStatus.success => 'SUCCESS',
ResendStatus.unknown => '',
};
bool get isResendNotAllowed => this == ResendStatus.resendNotAllowed;
bool get isSuccess => this == ResendStatus.success;
}