退出登录+机器状态+切换设备+历史作业记录+设备信息
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:maibu_satabot_v2/core/router/route_paths.dart';
|
||||
import 'package:maibu_satabot_v2/features/ai/presentation/routes/ai_routes.dart';
|
||||
import 'package:maibu_satabot_v2/features/auth/presentation/pages/login_page.dart';
|
||||
import 'package:maibu_satabot_v2/features/auth/presentation/routes/auth_routes.dart';
|
||||
import 'package:maibu_satabot_v2/features/home/presentation/routes/home_routes.dart';
|
||||
import 'package:maibu_satabot_v2/features/my/presentation/routes/my_routes.dart';
|
||||
|
||||
import '../../features/auth/presentation/bloc/auth_cubit.dart';
|
||||
import '../../features/auth/presentation/bloc/auth_state.dart';
|
||||
import '../../features/machine_details/presentation/pages/machine_details_page.dart';
|
||||
import '../../features/main_container/presentation/main_wrapper.dart';
|
||||
import 'go_router_refresh_stream.dart';
|
||||
|
||||
GoRouter createRouter(AuthCubit authCubit) {
|
||||
return GoRouter(
|
||||
|
||||
initialLocation: RoutePaths.login,
|
||||
refreshListenable: GoRouterRefreshStream(authCubit.stream),
|
||||
redirect: (context, state) {
|
||||
@@ -27,6 +30,18 @@ GoRouter createRouter(AuthCubit authCubit) {
|
||||
return null;
|
||||
},
|
||||
routes: [
|
||||
// 注册 machineDetails 路由
|
||||
GoRoute(
|
||||
path: RoutePaths.machineDetails,
|
||||
builder: (context, state) => const MachineDetailsPage(), // 替换为实际页面
|
||||
),
|
||||
|
||||
// 注册登录注册 路由
|
||||
GoRoute(
|
||||
path: RoutePaths.machineDetails,
|
||||
builder: (context, state) => const LoginPage(), // 替换为实际页面
|
||||
),
|
||||
|
||||
// 1. 外部路由(无底部导航栏)
|
||||
...AuthRoutes.routes,
|
||||
...HomeRoutes.routes,
|
||||
|
||||
@@ -13,4 +13,9 @@ class RoutePaths {
|
||||
static const remoteControl = '/home/remote_control';
|
||||
static const routePlan = '/home/route_plan';
|
||||
static const runningStatus = '/home/running_status';
|
||||
|
||||
static const machineDetails = '/machine_details/machine_details';
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user