loadData method

Future loadData({
  1. bool afterClear = false,
})

Implementation

Future loadData({bool afterClear = false}) async {
  status = ListStatus.LOADING;
  notifyListeners();

  switch (listType) {
    case ListType.PAGING:
      await pagingController?.loadListData();
      setListType(ListType.PAGING);
      break;
    case ListType.FILTERING:
      await filterController?.loadMore();
      setListType(ListType.FILTERING);
      break;
  }
  notifyListeners();
}