30 lines
676 B
Dart
30 lines
676 B
Dart
import 'package:intl/intl.dart';
|
|
|
|
import '../../domain/auth/auth.dart';
|
|
|
|
part 'date_extension.dart';
|
|
|
|
extension StringExt on String {
|
|
CheckPhoneStatus toCheckPhoneStatus() {
|
|
switch (this) {
|
|
case 'NO_REGISTERED':
|
|
return CheckPhoneStatus.notRegistered;
|
|
case 'PASSWORD_REQUIRED':
|
|
return CheckPhoneStatus.passwordRequired;
|
|
default:
|
|
return CheckPhoneStatus.unknown;
|
|
}
|
|
}
|
|
|
|
ResendStatus toResendStatus() {
|
|
switch (this) {
|
|
case 'RESEND_NOT_ALLOWED':
|
|
return ResendStatus.resendNotAllowed;
|
|
case 'SUCCESS':
|
|
return ResendStatus.success;
|
|
default:
|
|
return ResendStatus.unknown;
|
|
}
|
|
}
|
|
}
|