基本完成除了详情
This commit is contained in:
43
lib/router/modules/base.dart
Normal file
43
lib/router/modules/base.dart
Normal file
@@ -0,0 +1,43 @@
|
||||
import 'package:plan/page/home/home_page.dart';
|
||||
|
||||
import '../../page/system/agree/agree_page.dart';
|
||||
import '../../page/system/login/login_code_page.dart';
|
||||
import '../../page/system/login/login_page.dart';
|
||||
import '../../page/system/splash/splash_page.dart';
|
||||
import '../config/route_paths.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.loginCode,
|
||||
child: (state) {
|
||||
final args = state.extra as Map;
|
||||
return LoginCodePage(email: args['email'], password: args['password']);
|
||||
},
|
||||
),
|
||||
RouteType(
|
||||
path: RoutePaths.layout,
|
||||
child: (state) {
|
||||
return HomePage();
|
||||
},
|
||||
),
|
||||
];
|
||||
19
lib/router/modules/plan.dart
Normal file
19
lib/router/modules/plan.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:plan/page/plan/detail/plan_detail_page.dart';
|
||||
import 'package:plan/page/plan/history/plan_history_page.dart';
|
||||
import 'package:plan/router/config/route_paths.dart';
|
||||
import 'package:plan/router/config/route_type.dart';
|
||||
|
||||
List<RouteType> planRoutes = [
|
||||
RouteType(
|
||||
path: RoutePaths.planHistory,
|
||||
child: (state) {
|
||||
return PlanHistoryPage();
|
||||
},
|
||||
),
|
||||
RouteType(
|
||||
path: RoutePaths.planDetail,
|
||||
child: (state) {
|
||||
return PlanDetailPage();
|
||||
},
|
||||
),
|
||||
];
|
||||
Reference in New Issue
Block a user