forceRefresh method

void forceRefresh({
  1. bool keepPreviousData = false,
  2. PageKeyType? newArg,
})

Implementation

void forceRefresh({bool keepPreviousData = false, PageKeyType? newArg}) {
  state = state.copyWith(
    itemList: keepPreviousData ? state.itemList : null,
    nextPageKey: newArg ?? arg,
    error: null,
    isRefreshing: true,
    needRequestData: true,
  );
}