Skip to content

Instantly share code, notes, and snippets.

@nguyenchilong
Created July 5, 2020 09:07
Show Gist options
  • Save nguyenchilong/65103248f8b348cf49e0b9ea7370d0d0 to your computer and use it in GitHub Desktop.
Save nguyenchilong/65103248f8b348cf49e0b9ea7370d0d0 to your computer and use it in GitHub Desktop.
import 'package:redux_remote_devtools/redux_remote_devtools.dart';
Future<Store<AppState>> createStore() async {
// make sure to replace '192.168.1.5' your ip
var remoteDevtools = RemoteDevToolsMiddleware('192.168.1.5:8000');
var store = Store<AppState>(
appReducer,
initialState: AppState.initial(),
middleware: []
// ..addAll(createNotificationMiddleware())
// add this
..addAll([remoteDevtools]),
);
// and this
remoteDevtools.store = store;
await remoteDevtools.connect();
return store;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment