toggleRefreshState method

dynamic toggleRefreshState(
  1. RefreshState refreshState
)

Implementation

toggleRefreshState(RefreshState refreshState) {
  _refreshController.refreshCompleted();
  if (refreshState == RefreshState.idle) {
    _refreshController.loadComplete();
  } else if (refreshState == RefreshState.failure) {
    _refreshController.loadFailed();
  } else if (refreshState == RefreshState.noMoreData) {
    _refreshController.loadNoData();
  }
}