@@ -3,19 +3,19 @@ part of redux_remote_devtools;
33/// The connection state of the middleware
44enum RemoteDevToolsStatus {
55 /// No socket connection to the remote host
6- NOT_CONNECTED ,
6+ notConnected ,
77
88 /// Attempting to open socket
9- CONNECTING ,
9+ connecting ,
1010
1111 /// Connected to remote, but not started
12- CONNECTED ,
12+ connected ,
1313
1414 /// Awating start response
15- STARTING ,
15+ starting ,
1616
1717 /// Sending and receiving actions
18- STARTED
18+ started
1919}
2020
2121class RemoteDevToolsMiddleware extends MiddlewareClass {
@@ -30,7 +30,7 @@ class RemoteDevToolsMiddleware extends MiddlewareClass {
3030 SocketClusterWrapper socket;
3131 Store store;
3232 String _channel;
33- RemoteDevToolsStatus status = RemoteDevToolsStatus .NOT_CONNECTED ;
33+ RemoteDevToolsStatus status = RemoteDevToolsStatus .notConnected ;
3434
3535 ActionEncoder actionEncoder;
3636 StateEncoder stateEncoder;
@@ -45,11 +45,11 @@ class RemoteDevToolsMiddleware extends MiddlewareClass {
4545 }
4646
4747 connect () async {
48- _setStatus (RemoteDevToolsStatus .CONNECTING );
48+ _setStatus (RemoteDevToolsStatus .connecting );
4949 await this .socket.connect ();
50- _setStatus (RemoteDevToolsStatus .CONNECTED );
50+ _setStatus (RemoteDevToolsStatus .connected );
5151 this ._channel = await this ._login ();
52- _setStatus (RemoteDevToolsStatus .STARTING );
52+ _setStatus (RemoteDevToolsStatus .starting );
5353 this ._relay ('START' );
5454 this .socket.on (_channel, (String name, dynamic data) {
5555 this .handleEventFromRemote (data as Map <String , dynamic >);
@@ -89,7 +89,7 @@ class RemoteDevToolsMiddleware extends MiddlewareClass {
8989 break ;
9090 // The START action is a response indicating that remote devtools is up and running
9191 case 'START' :
92- _setStatus (RemoteDevToolsStatus .STARTED );
92+ _setStatus (RemoteDevToolsStatus .started );
9393 break ;
9494 default :
9595 print ('Unknown type:' + data['type' ].toString ());
@@ -111,7 +111,7 @@ class RemoteDevToolsMiddleware extends MiddlewareClass {
111111 /// Middleware function called by redux, dispatches actions to devtools
112112 call (Store store, dynamic action, NextDispatcher next) {
113113 next (action);
114- if (this .status == RemoteDevToolsStatus .STARTED && ! (action is DevToolsAction )) {
114+ if (this .status == RemoteDevToolsStatus .started && ! (action is DevToolsAction )) {
115115 this ._relay ('ACTION' , store.state, action);
116116 }
117117 }
0 commit comments