This commit is contained in:
Hamza Aleghwairyeen
2024-04-21 01:26:42 +03:00
parent 731769edc0
commit a2d1479513
18 changed files with 1087 additions and 117 deletions

View File

@@ -84,17 +84,18 @@ class LoginController extends GetxController {
'phone': phoneController.text,
'password': passwordController.text
});
isloading = false;
update();
if (res == 'Failure') {
isloading = false;
update();
Get.snackbar('Failure', '', backgroundColor: Colors.red);
} else {
// print(res);
var jsonDecoeded = jsonDecode(res);
// print(jsonDecoeded);
if (jsonDecoeded.isNotEmpty) {
if (jsonDecoeded['status'] == 'success') {
print(jsonDecoeded['data'][0]['verified']);
if (jsonDecoeded['data'][0]['verified'] == 1) {
if (jsonDecoeded['data'][0]['verified'] == '1') {
box.write(BoxName.passengerID, jsonDecoeded['data'][0]['id']);
box.write(BoxName.email, jsonDecoeded['data'][0]['email']);
box.write(