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() {
super.onInit();
final findCurrentAccountController = Get.find<AccountUserController>();
currentUserAccounts.value =
findCurrentAccountController.currentUserAccounts.value;
if (userID == null && username == null) {
userID = currentUserAccounts.value.user.value.userID;
}
//Bellekteki paylaşımları yükle
if (cachedmediaList != null) {
mediaList.value ??= [];
filteredMediaList.value ??= [];
mediaList.value = cachedmediaList;
filteredMediaList.value = cachedmediaList;
}
fetchgallery();
}