From 64d11cc86d221f1522b09082a7c095cc9258ea6a Mon Sep 17 00:00:00 2001 From: thomashii Date: Sun, 21 Mar 2021 09:18:46 +0800 Subject: [PATCH] Added default param --- packages/mock_request/lib/src/request.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/mock_request/lib/src/request.dart b/packages/mock_request/lib/src/request.dart index 69d83b05..df994f5b 100644 --- a/packages/mock_request/lib/src/request.dart +++ b/packages/mock_request/lib/src/request.dart @@ -51,11 +51,11 @@ class MockHttpRequest String? protocolVersion, String? sessionId, this.certificate, - required this.persistentConnection}) { + this.persistentConnection = true}) { _buf = BytesBuilder(copy: copyBuffer != false); _session = MockHttpSession(id: sessionId ?? 'mock-http-session'); - this.protocolVersion = - protocolVersion?.isNotEmpty == true ? protocolVersion! : '1.1'; + + this.protocolVersion = protocolVersion ?? '1.1'; } @override