// enum APPSTATUS { // loading, // unAuthenticated, // authenticated, // unverified, // } enum AuthMethodTypesEnum { sms, whatsApp, fingerPrint, faceID, moreOptions, } enum ViewStateEnum { hide, idle, busy, error, busyLocal, errorLocal, } enum LoginTypeEnum { fromLogin, silentLogin, silentWithOTP, } enum OTPTypeEnum { sms, whatsapp } enum CountryEnum { saudiArabia, unitedArabEmirates } enum SelectionTypeEnum { dropdown, calendar } enum GenderTypeEnum { male, female } enum MaritalStatusTypeEnum { single, married, divorced, widowed } 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"); } } }