You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the arguments received from the widget changed, we wanted to clear the existing listener for the pagingController and populate a new one. How can i do this?
@overridevoiddidUpdateWidget(convariant MyWidget oldWidget) {
super.didUpdateWidget(oldWidget);
if (oldWidget.path != widget.path) {
_pagingController.removePageRequestListener(_pageRequestListener!);
_pageRequestListener =null;
_pageRequestListener = (pageKey) async {
// This is where we use viewModel.
}
_pagingController.addPageRequestListener(_pageRequestListener!);
_pagingController.refresh();
}
}
The text was updated successfully, but these errors were encountered:
@AsheKR we've never had this requirement so it's not built into Stacked at the moment. This came up a few times in different ways. For instance getting life cycle callbacks in the viewmodel.
I'll add this to the list of features but right now we have nothing to facilitate this.
When the arguments received from the widget changed, we wanted to clear the existing listener for the pagingController and populate a new one. How can i do this?
The text was updated successfully, but these errors were encountered: