slovnicki / beamer

A routing package built on top of Router and Navigator's pages API, supporting arbitrary nested navigation, guards and more.
MIT License
589 stars 130 forks source link

Not Found Page #638

Open shubhammemane1 opened 1 year ago

shubhammemane1 commented 1 year ago

i have added list of pages in BeamerDelegate but what if i not added page or user is changed trough directly URL i should redirect to not found page

2i07kgScar

how to add not found page in this

felixdollack commented 1 year ago

@shubhammemane1 you can add a "not found page" to your BeamerDelegate like this

final routerDelegate = BeamerDelegate(
  notFoundPage: const BeamPage(
    key: ValueKey("NotFound"),
    title: "NotFound",
    child: Placeholder(),
  ),
  locationBuilder: ...
);