This commit is contained in:
zhutao
2025-08-22 14:15:02 +08:00
parent 5853bdf004
commit 99a1ce601e
120 changed files with 5297 additions and 101 deletions

View File

@@ -0,0 +1,49 @@
import 'package:derma_flutter/layout/layout_page.dart';
import 'package:derma_flutter/page/system/login/login_code_page.dart';
import 'package:derma_flutter/page/system/splash/splash_page.dart';
import 'package:derma_flutter/router/config/route_paths.dart';
import '../../page/system/agree/agree_page.dart';
import '../../page/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.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();
},
),
];

View File

@@ -0,0 +1,28 @@
import 'package:derma_flutter/api/dto/skin_check_dto.dart';
import 'package:derma_flutter/page/education/detail/education_detail_page.dart';
import 'package:derma_flutter/page/record/detail/record_detail_page.dart';
import '../config/route_paths.dart';
import '../config/route_type.dart';
List<RouteType> serverRoutes = [
RouteType(
path: RoutePaths.detail,
child: (state) {
// final params = state.pathParameters;
final extra = state.extra! as SkinCheckDto;
return RecordDetailPage(
data: extra,
);
},
),
RouteType(
path: RoutePaths.articleDetail(),
child: (state) {
final params = state.pathParameters;
return EducationDetailPage(
id: params['id']!,
);
},
),
];