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) {
|
} else if (index == 1) {
|
||||||
html.window.history.pushState(null, '', '/products');
|
html.window.history.pushState(null, '', '/#/products');
|
||||||
_selectedWidget = const Products();
|
_selectedWidget = const Products();
|
||||||
} else if (index == 2) {
|
} else if (index == 2) {
|
||||||
html.window.history.pushState(null, '', '');
|
html.window.history.pushState(null, '', '');
|
||||||
_selectedWidget = const Home();
|
_selectedWidget = const Home();
|
||||||
} else if (index == 3) {
|
} else if (index == 3) {
|
||||||
html.window.history.pushState(null, '', '/cart');
|
html.window.history.pushState(null, '', '/#/cart');
|
||||||
_selectedWidget = const Cart();
|
_selectedWidget = const Cart();
|
||||||
} else if (index == 4) {
|
} else if (index == 4) {
|
||||||
checkSessionExist().then((isLoggedIn) {
|
checkSessionExist().then((isLoggedIn) {
|
||||||
|
|
|
@ -20,7 +20,7 @@ class NavigationAuth extends StatelessWidget {
|
||||||
if (data) {
|
if (data) {
|
||||||
return route;
|
return route;
|
||||||
} else {
|
} else {
|
||||||
html.window.history.pushState(null, '', '/login');
|
html.window.history.pushState(null, '', '/#/login');
|
||||||
return const Login();
|
return const Login();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue