You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason i found i wanted this was because there are times where it's desirable to trigger some form of navigation action as result of state change. You can't do that during the build action (as far as i understand), but you can do it in the IgnoreChangeCallback pre-build. This works, but feels odd for two reasons. One it happens before the distinct filter which sometimes is useful, and two it's passed the State and not the ViewModel so i can end up duplicating some conversion i've done for the viewModel.
Interested in hearing thoughts and opinions on approaches to dealing with this. I've made the above suggested change locally and using it, so i can submit a pull request if deemed a good idea.
The text was updated successfully, but these errors were encountered:
Yah, I think it that type of function might be necessary. I was hoping to avoid it, but there are a few imperative APIs in Flutter that are awkward to work with (Navigation, TabController, TextEditingController, etc). The usual way of handling it is to "Send that action to your Middleware and handle it there," but Navigation, etc are all View concerns, and stuffing it into the Middleware feels wrong.
I'd be happy to accept a PR! One thing: Please make sure to add tests for any change :)
I've been toying with the idea of introducing an additional callback, something like.
The reason i found i wanted this was because there are times where it's desirable to trigger some form of navigation action as result of state change. You can't do that during the build action (as far as i understand), but you can do it in the IgnoreChangeCallback pre-build. This works, but feels odd for two reasons. One it happens before the distinct filter which sometimes is useful, and two it's passed the State and not the ViewModel so i can end up duplicating some conversion i've done for the viewModel.
Interested in hearing thoughts and opinions on approaches to dealing with this. I've made the above suggested change locally and using it, so i can submit a pull request if deemed a good idea.
The text was updated successfully, but these errors were encountered: