This commit is contained in:
Hamza-Ayed
2024-05-29 16:09:37 +03:00
parent 058fb67a41
commit 4af52f4392
44 changed files with 9509 additions and 2044 deletions

View File

@@ -62,6 +62,8 @@ class CaptainProfileController extends GetxController {
Map captainProfileData = {};
Future getProfileData() async {
isLoading = true;
update();
var res = await CRUD().get(
link: AppLink.getCaptainProfile,
payload: {'id': box.read(BoxName.driverID)});
@@ -69,7 +71,7 @@ class CaptainProfileController extends GetxController {
var d = jsonDecode(res);
captainProfileData = d['message'];
update();
print(d['message']);
print(captainProfileData);
box.write(BoxName.sexDriver, d['message']['gender']);
box.write(BoxName.dobDriver, d['message']['birthdate']);
box.write(BoxName.vin, d['message']['vin']);
@@ -80,7 +82,7 @@ class CaptainProfileController extends GetxController {
box.write(BoxName.year, d['message']['year']);
box.write(BoxName.expirationDate, d['message']['expiration_date']);
// box.write(BoxName.acc, d['message']['accountBank']);
isLoading = false;
update();
}
}