dispatchFunction method
void
dispatchFunction(
- ListPullFooterViewModel viewModel,
- String functionName,
- VoltronArray array, {
- Promise? promise,
override
Implementation
@override
void dispatchFunction(ListPullFooterViewModel viewModel, String functionName, VoltronArray array,
{Promise? promise}) {
if (collapsePullFooter == functionName) {
var listViewModel = viewModel.parent;
if (listViewModel is ListViewModel) {
// delay to keep data update first
Future.delayed(const Duration(milliseconds: 0), () {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
listViewModel.refreshEventDispatcher.loadingCompleted();
// fire postFrameCallback
WidgetsBinding.instance.scheduleFrame();
});
});
}
}
}