onInit method
Called immediately after the widget is allocated in memory. You might use this to initialize something for the controller.
Implementation
@override
void onInit() async {
super.onInit();
AppConfig.logger.t("onInit Chamber Controller");
try {
userServiceImpl.itemlistOwnerType = OwnerType.profile;
profile = userServiceImpl.profile;
ownerId = profile.id;
ownerName = profile.name;
if(Get.arguments != null) {
if(Get.arguments.isNotEmpty && Get.arguments[0] is Band) {
band = Get.arguments[0];
userServiceImpl.band = band!;
}
if(band != null) {
ownerId = band!.id;
ownerName = band!.name;
ownerType = OwnerType.band;
userServiceImpl.itemlistOwnerType = OwnerType.band;
}
}
} catch (e) {
AppConfig.logger.e(e.toString());
}
}