showSuggestions method

void showSuggestions (BuildContext context)

Transition from showing the results returned by buildResults to showing the suggestions returned by buildSuggestions.

Calling this method will also put the input focus back into the search field of the AppBar.

If the results are currently shown this method can be used to go back to showing the search suggestions.

See also:

Implementation

void showSuggestions(BuildContext context) {
  assert(_focusNode != null, '_focusNode must be set by route before showSuggestions is called.');
  _focusNode.requestFocus();
  _currentBody = _SearchBody.suggestions;
}