onInit method

  1. @override
void onInit()
override

Called immediately after the widget is allocated in memory. You might use this to initialize something for the controller.

Implementation

@override
void onInit() {
  // userCategory = storage.read("USER_CATEGORY");
  // callHistoryApi();
  // getClockedInOutStatus();
  // designationId = storage.read("DESIGNATION_ID");
  userId = SecureStorageService.readSecureData(
        SecureStorageService.userId,
      ) ??
      "";
  userLevelName = SecureStorageService.readSecureData(
        SecureStorageService.levelNameLogin,
      ) ??
      "";
  partnerId = SecureStorageService.readSecureData(
        SecureStorageService.partnerIdLogin,
      ) ??
      "";
  super.onInit();
}