You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
HMG_Patient_App_New/lib/core/enums.dart

66 lines
1.1 KiB
Dart

2 months ago
// enum APPSTATUS {
// loading,
// unAuthenticated,
// authenticated,
// unverified,
// }
enum AuthMethodTypesEnum {
2 months ago
sms,
whatsApp,
fingerPrint,
faceID,
moreOptions,
}
enum ViewStateEnum {
2 months ago
hide,
idle,
busy,
error,
busyLocal,
errorLocal,
}
enum LoginTypeEnum {
2 months ago
fromLogin,
silentLogin,
silentWithOTP,
2 months ago
}
2 months ago
enum OTPTypeEnum { sms, whatsapp }
2 months ago
enum CountryEnum { saudiArabia, unitedArabEmirates }
2 months ago
enum SelectionTypeEnum { dropdown, calendar }
2 months ago
enum GenderTypeEnum { male, female }
2 months ago
enum MaritalStatusTypeEnum { single, married, divorced, widowed }
2 months ago
enum ChipTypeEnum { success, error, alert, info, warning }
extension OTPTypeEnumExtension on OTPTypeEnum {
/// Convert enum to int
int toInt() {
switch (this) {
case OTPTypeEnum.sms:
return 1;
case OTPTypeEnum.whatsapp:
return 2;
}
}
/// Convert int to enum
static OTPTypeEnum fromInt(int value) {
switch (value) {
case 1:
return OTPTypeEnum.sms;
case 2:
return OTPTypeEnum.whatsapp;
default:
throw Exception("Invalid OTPTypeEnum value: $value");
}
}
}