1

I am new to flutter and will be implementing the redux framework in my flutter app. I would like to monitor the state of my application and thus, would like to know if I could use a redux flutter debugger.

MindBrain
  • 7,398
  • 11
  • 54
  • 74
  • It's here on official site, but you need to go through it... https://flutter.dev/docs/testing/debugging#dart-observatory-statement-level-single-stepping-debugger-and-profiler Since your question is not regarding portion of a code, we don't know where you stuck, and what to fix. so, it's hard to tell you.. here's another link https://medium.com/flutter-community/developing-and-debugging-flutter-apps-for-ios-without-a-mac-8d362a8ec667 . – Jabongg Apr 17 '19 at 09:12
  • I want to be able to view the state changes that take place in the redux store of the flutter app. – MindBrain Apr 17 '19 at 09:26

1 Answers1

0

You can use Flutter Redux Time Travel built by Brian Egan, the same person who made the flutter_redux package. With this you can debug redux states in your app and also see the previous states that you have gone through.

The implementation is pretty easy. While developing you use a DevToolsStore instead of a normal Store and use it in your StoreProvider.

// Create a DevToolsStore instead of a normal Store during Development
final devStore = DevToolsStore<MyAppState>(
  myReducer,
  initialState: MyAppState()
);

Your StoreProvider should look like this:

StoreProvider(
     store: this.devStore,
     child: MaterialApp(
     // Omitting some boilerplate here
     home: Scaffold(
       endDrawer: ReduxDevTools<MyAppState>(store),
     ),
   ),
);

What you will see is a Drawer Hamburger Icon on the right side of your app bar which will help you to navigate through the app states.

Shababb Karim
  • 3,614
  • 1
  • 22
  • 35