So I set my routes up like this:
I set my initial route:
initialRoute: "/",
& then my onGenerateRoutes:
onGenerateRoute: (settings) {
switch (settings.name) {
case HomePage.route:
int? selectedIndex = settings.arguments as int?;
return MaterialPageRoute(
builder: (context) =>
HomePage(selectedIndex: selectedIndex ?? 0));
case FPassword.route:
return MaterialPageRoute(
builder: (context) => const FPassword(),
);
}
},
Im saving the route itself in each corresponding class:
static const String route = '/password';
& im navigating like:
onTap: () => Navigator.pushNamed(
context, HomePage.route,
arguments: 0),
But the problem that Im facing is that the route itself isnt appearing in my domain, it always stays like:
http://localhost:61694/#/
It doesnt change. I already ran pub clean, started everything anew & so on. So where have I made my mistake?