5/29/3
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user