Add direct path support to access some pages
This commit is contained in:
parent
e6ec1a13ef
commit
8f6ae35e4d
1 changed files with 10 additions and 0 deletions
|
@ -3,6 +3,8 @@ import 'package:flutter/material.dart';
|
|||
import 'package:page_transition/page_transition.dart';
|
||||
import 'package:animated_splash_screen/animated_splash_screen.dart';
|
||||
|
||||
import 'package:nekoya_flutter/screens/login.dart';
|
||||
import 'package:nekoya_flutter/screens/register.dart';
|
||||
import 'package:nekoya_flutter/components/menu.dart';
|
||||
import 'package:nekoya_flutter/utils/url_strategy.dart';
|
||||
|
||||
|
@ -37,6 +39,14 @@ class _NekoyaState extends State<Nekoya> {
|
|||
nextScreen: const Menu(initialScreen: 2,),
|
||||
),
|
||||
debugShowCheckedModeBanner: false,
|
||||
initialRoute: '',
|
||||
routes: {
|
||||
'' : (context) => const Menu(initialScreen: 2,),
|
||||
'/login': (context) => const Login(),
|
||||
'/register': (context) => const Register(),
|
||||
'/products' : (context) => const Menu(initialScreen: 1,),
|
||||
'/cart' : (context) => const Menu(initialScreen: 3,),
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue