setRefresh method

void setRefresh(
  1. bool refresh
)

This function can be used to handle the refresh state. for most cases refresh() should be fine.

Implementation

void setRefresh(bool refresh) {
  _shouldRefresh = refresh;
  notifyListeners();
}