Add country dropdown selector to login screens of siro_service and siro_admin
This commit is contained in:
@@ -23,6 +23,13 @@ class OtpHelper extends GetxController {
|
||||
static final String _checkAdminLogin =
|
||||
'${AppLink.server}/Admin/auth/login.php';
|
||||
|
||||
var selectedCountry = 'Jordan'.obs;
|
||||
|
||||
void changeCountry(String country) {
|
||||
selectedCountry.value = country;
|
||||
box.write(BoxName.countryCode, country);
|
||||
}
|
||||
|
||||
/// إرسال OTP
|
||||
static Future<bool> sendOtp(String phoneNumber) async {
|
||||
try {
|
||||
@@ -281,6 +288,7 @@ class OtpHelper extends GetxController {
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
selectedCountry.value = box.read(BoxName.countryCode) ?? 'Jordan';
|
||||
super.onInit();
|
||||
DeviceHelper.getDeviceFingerprint().then((deviceFingerprint) {
|
||||
box.write(BoxName.fingerPrint, deviceFingerprint);
|
||||
|
||||
Reference in New Issue
Block a user