diff --git a/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart index c8e4ce483b..ab117c37d0 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart @@ -23,8 +23,8 @@ Future>> sentHeaders( await request.response.close(); }); - final task = session.dataTaskWithRequest( - URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}'))) + final task = session.dataTaskWithRequest(URLRequest.fromUrl( + Uri(scheme: 'http', host: 'localhost', port: server.port))) ..resume(); while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { await pumpEventQueue();