goForward method

Future<Response?> goForward({
  1. Duration? timeout,
  2. Until? wait,
})

Navigate to the next page in history.

Parameters:

  • timeout Maximum navigation time in milliseconds, defaults to 30 seconds, pass Duration.zero to disable timeout. The default value can be changed by using the Page.defaultNavigationTimeout or Page.defaultTimeout properties.
  • wait When to consider navigation succeeded, defaults to Until.load. Given an array of event strings, navigation is considered to be successful after all events have been fired. Events can be either:
    • Until.load - consider navigation to be finished when the load event is fired.
    • Until.domContentLoaded - consider navigation to be finished when the DOMContentLoaded event is fired.
    • Until.networkIdle - consider navigation to be finished when there are no more than 0 network connections for at least 500 ms.
    • Until.networkAlmostIdle - consider navigation to be finished when there are no more than 2 network connections for at least 500 ms.

Returns: Future<Response> which resolves to the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. If can not go back, resolves to null.

Implementation

Future<Response?> goForward({Duration? timeout, Until? wait}) {
  return _go(1, timeout: timeout, wait: wait);
}