64 lines
1.5 KiB
Dart
64 lines
1.5 KiB
Dart
import 'package:food_health/layout/layout_page.dart';
|
|
import 'package:food_health/pages/system/code/login_code_page.dart';
|
|
import 'package:food_health/pages/system/intro/intro_page.dart';
|
|
import 'package:food_health/pages/system/splash/splash_page.dart';
|
|
import 'package:food_health/pages/system/test_page.dart';
|
|
import 'package:food_health/router/config/route_paths.dart';
|
|
|
|
import '../../pages/system/agree/agree_page.dart';
|
|
import '../../pages/system/login/login_page.dart';
|
|
import '../config/route_type.dart';
|
|
|
|
List<RouteType> baseRoutes = [
|
|
RouteType(
|
|
path: RoutePaths.splash,
|
|
child: (state) {
|
|
return SplashPage();
|
|
},
|
|
),
|
|
RouteType(
|
|
path: RoutePaths.agreement,
|
|
child: (state) {
|
|
final extra = state.extra as Map<String, String>;
|
|
return AgreePage(
|
|
title: extra['title'] ?? "",
|
|
url: extra['url'] ?? "",
|
|
);
|
|
},
|
|
),
|
|
RouteType(
|
|
path: RoutePaths.login,
|
|
child: (state) {
|
|
return LoginPage();
|
|
},
|
|
),
|
|
RouteType(
|
|
path: RoutePaths.intro,
|
|
child: (state) {
|
|
return IntroPage();
|
|
},
|
|
),
|
|
RouteType(
|
|
path: RoutePaths.loginCode,
|
|
child: (state) {
|
|
final args = state.extra as Map;
|
|
return LoginCodePage(
|
|
email: args['email'],
|
|
password: args['password'],
|
|
);
|
|
},
|
|
),
|
|
RouteType(
|
|
path: RoutePaths.layout,
|
|
child: (state) {
|
|
return LayoutPage();
|
|
},
|
|
),
|
|
RouteType(
|
|
path: "/test",
|
|
child: (state) {
|
|
return TestPage();
|
|
},
|
|
),
|
|
];
|