1234567891011121314151617181920212223242526272829303132 |
- import 'package:flutter/material.dart';
- import 'package:hmssdk_demo/pages/home_page.dart';
- import 'package:hmssdk_demo/pages/login_page.dart';
- import 'package:hmssdk_demo/pages/profile_page.dart';
- /// Description: routes
- /// Time : 08/09/2023 Wednesday
- /// Author : liuyuqi.gov@msn.cn
- class Routes {
- static const String home = "/home";
- static const String login = "/login";
- static const String register = "/register";
- static const String profile = "/profile";
- static const String editProfile = "/editProfile";
- static MaterialPageRoute<dynamic> onGenerateRoute(RouteSettings settings) {
- switch (settings.name) {
- case home:
- return MaterialPageRoute(builder: (_) => HomePage());
- case login:
- return MaterialPageRoute(builder: (_) => LoginPage());
- // case register:
- // return MaterialPageRoute(builder: (_) => Register());
- case profile:
- return MaterialPageRoute(builder: (_) => ProfilePage());
- // case editProfile:
- // return MaterialPageRoute(builder: (_) => EditProfile());
- default:
- return MaterialPageRoute(builder: (_) => HomePage());
- }
- }
- }
|