onInit method
Called immediately after the widget is allocated in memory. You might use this to initialize something for the controller.
Implementation
@override
Future<void> onInit() async {
super.onInit();
userImgUrl.value =
SessionManagement.getUserImage() ?? Constants.emptyString;
mirrorFlyLog("auth : ", SessionManagement.getAuthToken().toString());
//Compared with sample app, generally we are getting the profile details based on the condition so getProfile is left alone
/*if (Get.arguments != null) {
// from(Get.arguments["from"]);
if (from.value == Routes.login) {
profileMobile.text = Get.arguments['mobile'] ?? Constants.emptyString;
}
} else {
profileMobile.text = Constants.emptyString;
}*/
/*if (from.value == Routes.login) {
if(await AppUtils.isNetConnected()) {
getProfile();
}else{
toToast(AppConstants.noInternetConnection);
}
checkAndEnableNotificationSound();
}else{*/
getProfile();
// }
//profileStatus.value="I'm Mirror fly user";
// await askStoragePermission(context);
}