From 4164a122ae3fbf35ffeb827f4a0737bb15109e3a Mon Sep 17 00:00:00 2001 From: Alex Li Date: Thu, 11 Jan 2024 00:45:52 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20--?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/http2_adapter/lib/src/http2_adapter.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/http2_adapter/lib/src/http2_adapter.dart b/plugins/http2_adapter/lib/src/http2_adapter.dart index 174e706be..f10e94e53 100644 --- a/plugins/http2_adapter/lib/src/http2_adapter.dart +++ b/plugins/http2_adapter/lib/src/http2_adapter.dart @@ -34,10 +34,11 @@ class DioH2NotSupportedException extends SocketException { /// A Dio HttpAdapter which implements Http/2.0. class Http2Adapter implements HttpClientAdapter { Http2Adapter( - this.connectionManager, { + ConnectionManager? connectionManager, { HttpClientAdapter? fallbackAdapter, this.onNotSupported, - }) : fallbackAdapter = fallbackAdapter ?? IOHttpClientAdapter(); + }) : connectionManager = connectionManager ?? ConnectionManager(), + fallbackAdapter = fallbackAdapter ?? IOHttpClientAdapter(); /// {@macro dio_http2_adapter.ConnectionManager} ConnectionManager connectionManager;