2025-09-18 06:03:02 +07:00
|
|
|
import 'package:intl/intl.dart';
|
|
|
|
|
|
2025-09-18 05:51:17 +07:00
|
|
|
import '../../domain/auth/auth.dart';
|
|
|
|
|
|
2025-09-18 06:03:02 +07:00
|
|
|
part 'date_extension.dart';
|
|
|
|
|
|
2025-09-18 05:51:17 +07:00
|
|
|
extension StringExt on String {
|
|
|
|
|
CheckPhoneStatus toCheckPhoneStatus() {
|
|
|
|
|
switch (this) {
|
2025-09-18 08:01:49 +07:00
|
|
|
case 'NOT_REGISTERED':
|
2025-09-18 05:51:17 +07:00
|
|
|
return CheckPhoneStatus.notRegistered;
|
|
|
|
|
case 'PASSWORD_REQUIRED':
|
|
|
|
|
return CheckPhoneStatus.passwordRequired;
|
|
|
|
|
default:
|
|
|
|
|
return CheckPhoneStatus.unknown;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-09-18 07:16:56 +07:00
|
|
|
|
|
|
|
|
ResendStatus toResendStatus() {
|
|
|
|
|
switch (this) {
|
|
|
|
|
case 'RESEND_NOT_ALLOWED':
|
|
|
|
|
return ResendStatus.resendNotAllowed;
|
|
|
|
|
case 'SUCCESS':
|
|
|
|
|
return ResendStatus.success;
|
|
|
|
|
default:
|
|
|
|
|
return ResendStatus.unknown;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-09-18 05:51:17 +07:00
|
|
|
}
|