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
At the moment it still requires to place a UserExceptionDialog<St> in between the MaterialApp and the HomePage Widget, which makes it hard to work with MaterialApp.router.
If possible the best case would be, to not require a UserExceptionDialog Widget at all
and instead directly use the ScaffoldMessenger to display the UserException with a SnackBar.
But this would be a breaking change, so let me know if this is something you want.
The text was updated successfully, but these errors were encountered:
I have no experience with Navigator 2.0. Is there a way to make what you propose without a breaking change? So that both Navigator 1 and 2 users could be happy with it?
You can just use the getAndRemoveFirstError() function.
For example in a view model as Event(getAndRemoveFirstError()) and then consume it in some widgets didUpdateWidget function or in a StoreConnector.onDidChange.
In the end you just need to map the event/error into a call to ScaffoldMessenger.of(context).showSnackBar and make sure you consume the event.
UserExceptionDialog was written before flutter had Navigator 2.0 and the new scaffold-messenger
At the moment it still requires to place a
UserExceptionDialog<St>
in between the MaterialApp and the HomePage Widget, which makes it hard to work withMaterialApp.router
.If possible the best case would be, to not require a UserExceptionDialog Widget at all
and instead directly use the ScaffoldMessenger to display the UserException with a SnackBar.
But this would be a breaking change, so let me know if this is something you want.
The text was updated successfully, but these errors were encountered: