Update routing
This commit is contained in:
parent
9f9b9aabf4
commit
8bddd57d19
2 changed files with 3 additions and 3 deletions
|
@ -71,13 +71,13 @@ class _MenuState extends State<Menu> {
|
|||
}
|
||||
});
|
||||
} else if (index == 1) {
|
||||
html.window.history.pushState(null, '', '/products');
|
||||
html.window.history.pushState(null, '', '/#/products');
|
||||
_selectedWidget = const Products();
|
||||
} else if (index == 2) {
|
||||
html.window.history.pushState(null, '', '');
|
||||
_selectedWidget = const Home();
|
||||
} else if (index == 3) {
|
||||
html.window.history.pushState(null, '', '/cart');
|
||||
html.window.history.pushState(null, '', '/#/cart');
|
||||
_selectedWidget = const Cart();
|
||||
} else if (index == 4) {
|
||||
checkSessionExist().then((isLoggedIn) {
|
||||
|
|
|
@ -20,7 +20,7 @@ class NavigationAuth extends StatelessWidget {
|
|||
if (data) {
|
||||
return route;
|
||||
} else {
|
||||
html.window.history.pushState(null, '', '/login');
|
||||
html.window.history.pushState(null, '', '/#/login');
|
||||
return const Login();
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue