With flutter go router is it possible to disable the error page? Because I want the error to show in a snackbar instead. I tried doing it in the redirect but the error in the redirect seems empty when for example you route to a page that does not exist.
2
Answers
Use try-catch block.
try { // your code... } catch(e) { final snackBar = SnackBar(content: Text('Error ${e}'),);}
Set a
MyErrorPageScreen
Widget and then inside MaterialApp.router -> routerConfig, set