9/15/4
This commit is contained in:
@@ -100,14 +100,25 @@ class LoginCaptinController extends GetxController {
|
||||
}
|
||||
}
|
||||
|
||||
// goToMapPage() {
|
||||
// if (box.read(BoxName.email) != null) {
|
||||
// Get.offAll(() => const MapPage());
|
||||
// }
|
||||
// }
|
||||
void loginByBoxData() async {
|
||||
isloading = true;
|
||||
update();
|
||||
|
||||
await CRUD().post(link: AppLink.addTokensDriver, payload: {
|
||||
'token': box.read(BoxName.tokenDriver).toString(),
|
||||
'captain_id': box.read(BoxName.driverID).toString()
|
||||
});
|
||||
isloading = false;
|
||||
update();
|
||||
}
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
|
||||
if (box.read(BoxName.driverID) != null ||
|
||||
box.read(BoxName.driverID) != '') {
|
||||
loginByBoxData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user