Closed lakshya2024 closed 3 months ago
when i type the inValid and enter it is not navigating to error page or Page not found Screen. instead of this, I'm getting errors in logs.
This is my code final routerDelegate = BeamerDelegate( transitionDelegate: const ReverseTransitionDelegate(), notFoundRedirectNamed: "/error", locationBuilder: RoutesLocationBuilder(routes: { '/': (context, state, data) => HomeScreen(), '/articles/': (context, state, data) => ArticlesHomeScreen(), '/articles/authors': (context, state, data) => ArticleAuthorsScreen(), '/articles/genres': (context, state, data) => ArticleGenresScreen(), '/books/authors': (context, state, data) => BookAuthorsScreen(), '/books/genres': (context, state, data) => BookGenresScreen(), '/books/*': (context, state, data) => BooksHomeScreen(), }),
#
@lakshya2024 You need to add the "/error" route to the routebuilder.
The error route actually needs to exist.
when i type the inValid and enter it is not navigating to error page or Page not found Screen. instead of this, I'm getting errors in logs.
This is my code final routerDelegate = BeamerDelegate( transitionDelegate: const ReverseTransitionDelegate(), notFoundRedirectNamed: "/error", locationBuilder: RoutesLocationBuilder(routes: { '/': (context, state, data) => HomeScreen(), '/articles/': (context, state, data) => ArticlesHomeScreen(), '/articles/authors': (context, state, data) => ArticleAuthorsScreen(), '/articles/genres': (context, state, data) => ArticleGenresScreen(), '/books/authors': (context, state, data) => BookAuthorsScreen(), '/books/genres': (context, state, data) => BookGenresScreen(), '/books/*': (context, state, data) => BooksHomeScreen(), }),
#