25-8-4-1
This commit is contained in:
@@ -69,10 +69,8 @@ class LoginDriverController extends GetxController {
|
||||
@override
|
||||
void onInit() async {
|
||||
box.write(BoxName.countryCode, 'Syria');
|
||||
box.read(BoxName.isTest) == null ||
|
||||
box.read(BoxName.isTest).toString() == '0'
|
||||
? await getAppTester()
|
||||
: null;
|
||||
// box.write(BoxName.driverID, '34feffd3fa72d6bee56b');
|
||||
await getAppTester();
|
||||
|
||||
super.onInit();
|
||||
}
|
||||
@@ -83,10 +81,15 @@ class LoginDriverController extends GetxController {
|
||||
payload: {'appPlatform': AppInformation.appName});
|
||||
if (res != 'failure') {
|
||||
var d = jsonDecode(res);
|
||||
|
||||
isTest = d['message'][0]['isTest'];
|
||||
box.write(BoxName.isTest, isTest);
|
||||
|
||||
Log.print('isTest: ${box.read(BoxName.isTest)}');
|
||||
update();
|
||||
} else {
|
||||
isTest = 0;
|
||||
box.write(BoxName.isTest, isTest);
|
||||
update();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user