1234567891011121314151617181920212223242526272829 |
- import 'package:flutter/material.dart';
- import 'package:flutter_chinese_chees/pages/login_page.dart';
- import 'package:flutter_chinese_chees/pages/register_page.dart';
- import 'package:flutter_chinese_chees/pages/splash_page.dart';
- class Routes {
- static const String home = '/';
- static const String login = '/login';
- static const String register = '/register';
- static const String logout = '/logout';
- static const String splash = '/splash';
- static const String guide = '/guide';
- static const String chat = '/chat';
- static Route onGenerateRoute(RouteSettings settings) {
- switch (settings.name) {
- // case home:
- // return MaterialPageRoute(builder: (_) => HomePage());
- case login:
- return MaterialPageRoute(builder: (_) => const LoginPage());
- case register:
- return MaterialPageRoute(builder: (_) => const RegisterPage());
- case splash:
- return MaterialPageRoute(builder: (_) => const SplashPage());
- default:
- return MaterialPageRoute(builder: (_) => const SplashPage());
- }
- }
- }
|