close method Null safety

void close(
  1. BuildContext context,
  2. T result

Closes the search page and returns to the underlying route.

The value provided for result is used as the return value of the call to showSearch that launched the search initially.


void close(BuildContext context, T result) {
  _currentBody = null;
    ..popUntil((Route<dynamic> route) => route == _route)