Add country dropdown selector to login screens of siro_service and siro_admin
This commit is contained in:
@@ -21,6 +21,13 @@ class LoginController extends GetxController {
|
||||
|
||||
final FlutterSecureStorage storage = const FlutterSecureStorage();
|
||||
|
||||
var selectedCountry = 'Jordan'.obs;
|
||||
|
||||
void changeCountry(String country) {
|
||||
selectedCountry.value = country;
|
||||
box.write(BoxName.countryCode, country);
|
||||
}
|
||||
|
||||
void login() async {
|
||||
// Ensure fingerprint is ready
|
||||
String fingerprint = box.read(BoxName.fingerPrint) ?? '';
|
||||
@@ -177,6 +184,7 @@ class LoginController extends GetxController {
|
||||
|
||||
@override
|
||||
void onInit() async {
|
||||
selectedCountry.value = box.read(BoxName.countryCode) ?? 'Jordan';
|
||||
await EncryptionHelper.initialize();
|
||||
await DeviceHelper.getDeviceFingerprint();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user