9/20/1
This commit is contained in:
@@ -101,24 +101,19 @@ class LoginCaptinController extends GetxController {
|
||||
}
|
||||
|
||||
void loginByBoxData() async {
|
||||
isloading = true;
|
||||
update();
|
||||
Get.offAll(() => const HomeCaptin());
|
||||
Get.to(() => const HomeCaptin());
|
||||
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() {
|
||||
void onInit() async {
|
||||
super.onInit();
|
||||
|
||||
if (box.read(BoxName.driverID) != null ||
|
||||
box.read(BoxName.driverID) != '') {
|
||||
loginByBoxData();
|
||||
}
|
||||
// if (box.read(BoxName.driverID).toString() != null) {
|
||||
// loginByBoxData();
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user