waitForResponse method

Future<Response> waitForResponse(
  1. String url, {
  2. Duration? timeout,
})

Implementation

Future<Response> waitForResponse(String url, {Duration? timeout}) {
  timeout ??= defaultTimeout ?? globalDefaultTimeout;

  return frameManager.networkManager.onResponse
      .where((response) =>
          path.url.normalize(response.url) == path.url.normalize(url))
      .first
      .timeout(timeout);
}