File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 2
2
// for details. All rights reserved. Use of this source code is governed by a
3
3
// BSD-style license that can be found in the LICENSE file.
4
4
5
- // @dart = 2.9
6
-
7
5
import 'dart:io' ;
8
6
9
7
import 'package:build_daemon/data/build_status.dart' as daemon;
@@ -66,7 +64,7 @@ class TestServer {
66
64
67
65
static Future <TestServer > start (
68
66
String hostname,
69
- int port,
67
+ int ? port,
70
68
Handler assetHandler,
71
69
AssetReader assetReader,
72
70
RequireStrategy strategy,
@@ -78,10 +76,10 @@ class TestServer {
78
76
bool autoRun,
79
77
bool enableDebugging,
80
78
bool useSse,
81
- UrlEncoder urlEncoder,
82
- ExpressionCompiler expressionCompiler,
79
+ UrlEncoder ? urlEncoder,
80
+ ExpressionCompiler ? expressionCompiler,
83
81
bool spawnDds,
84
- ExpressionCompilerService ddcService,
82
+ ExpressionCompilerService ? ddcService,
85
83
) async {
86
84
var pipeline = const Pipeline ();
87
85
@@ -122,6 +120,9 @@ class TestServer {
122
120
enableStdinCommands: false ,
123
121
customDevToolsPath: devToolsPath,
124
122
);
123
+ if (server == null ) {
124
+ throw StateError ('DevTools server could not be started.' );
125
+ }
125
126
return DevTools (server.address.host, server.port, server);
126
127
}
127
128
: null );
You can’t perform that action at this time.
0 commit comments