I have set up routes on my MaterialApp like this:
routes: {
'/': (context) => const Gate(),
'/ungated': (context) => const LandingPage(gated: false,)
}
it all works fine locally, but when I host it on Firebase hosting and I try to access the /ungated route I get 404 page not found.
also the 404 that I get is not the page I defined in onUnknownRoute: (settings)=> MaterialPageRoute(builder: (_) => _errorRoute(settings))
Any ideas? I feel that I need to change firebase.json
but have no idea what to put in there.
EDIT
The problem is because I am using PathUrlStrategy and Firebase Hosting does not work with that. I don't know if it's possible to make it work.