clearPage method

  1. @nonVirtual
bool clearPage()

Reset state to initial.

Implementation

@nonVirtual
bool clearPage() {
  if (_state._state is SearchStatusLoading ||
      _state._state is SearchStatusLoadingMore) {
    onReject();
    return false;
  } else {
    _state._resetState();
    _state._searchTarget = null;
    _state.idle();
    return true;
  }
}