File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,20 @@ class RemoteDevToolsMiddleware extends MiddlewareClass {
55
55
this ._channel = await this ._login ();
56
56
_setStatus (RemoteDevToolsStatus .starting);
57
57
this ._relay ('START' );
58
+
59
+ await Future (() {
60
+ final c = Completer ();
61
+ this .socket.on (_channel, (String name, dynamic data) {
62
+ if (data['type' ] == "START" ) {
63
+ _setStatus (RemoteDevToolsStatus .started);
64
+ c.complete ();
65
+ } else {
66
+ c.completeError (data);
67
+ }
68
+ });
69
+ return c.future;
70
+ });
71
+
58
72
this .socket.on (_channel, (String name, dynamic data) {
59
73
this .handleEventFromRemote (data as Map <String , dynamic >);
60
74
});
@@ -95,9 +109,9 @@ class RemoteDevToolsMiddleware extends MiddlewareClass {
95
109
case 'DISPATCH' :
96
110
_handleDispatch (data['action' ]);
97
111
break ;
98
- // The START action is a response indicating that remote devtools is up and running
99
- case 'START' :
100
- _setStatus (RemoteDevToolsStatus .started);
112
+ // The START action is a response indicating that remote devtools is up and running
113
+ case 'START' :
114
+ _setStatus (RemoteDevToolsStatus .started);
101
115
break ;
102
116
case 'ACTION' :
103
117
_handleRemoteAction (data['action' ] as String );
You can’t perform that action at this time.
0 commit comments