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,22 @@
class RoutePaths {
RoutePaths._();
///闪烁页
static const splash = "/";
///协议页
static const agreement = "/agreement";
///登录
static const login = "/login";
///登陆验证码
static const loginCode = "/loginCode";
///首页
static const layout = "/layout";
///预约详情
static const detail = "/detail";
///文章详情
static String articleDetail([int? id]) => id != null ? "/articleDetail/$id" : "/articleDetail/:id";
}

View File

@@ -0,0 +1,16 @@
import 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:go_router/go_router.dart';
class RouteType {
String path;
FutureOr<String?> Function(BuildContext, GoRouterState)? redirect;
Widget Function(GoRouterState) child;
RouteType({
required this.path,
required this.child,
this.redirect,
});
}