Closed bleszerd closed 1 year ago
Hey hey 👋
Thanks for the report. A couple of quick questions:
thunkMiddleware
in the list of middleware provided to your Store
? For example:final store = new Store<String>(
reducer,
middleware: [thunkMiddleware],
);
try/catch
part that fails? This could be verified with a breakpoint or print statement, whichever you'd prefer!Thanks, Brian
Let's take a closer look
This is my store
final appStore = Store<AppState>(
combineReducers([authReducer]),
initialState: AppState.initialState(),
middleware: [thunkMiddleware],
);
Yes, the function is called but it doesn't go into try/catch. The line below the comment "Printed!" in the example above is displayed in the logs
These are all my project dependencies:
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
flutter_svg: ^1.1.5
omni_datetime_picker: ^0.1.2
geolocator: ^9.0.2
dropdown_search: ^5.0.3
dio: ^4.0.6
flutter_redux: ^0.10.0
redux: ^5.0.0
flutter_redux_dev_tools: ^0.5.2
redux_thunk: ^0.4.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
Thanks for the help, let me know if you need more information 🚀.
I just realized that I imported the wrong store that didn't contain thunkMiddleware
as middleware and I ended up not realizing it. I apologize if I wasted your time on this.
Thank you again for your help 😅!
I'm trying to follow the example syntax on the repository homepage, but without success. Look:
Try/catch lines on
getGeolocationData
are never called.The closest I got was directly calling the internal function's call() method and providing the store like this:
Maybe it's unexpected behavior or I'm doing it wrong. In case of doubt, I decided to open an issue so that someone could help me.