USB 摄像头+远程遥控+中英的适配+topic的集成和状态的使用到相应页面

This commit is contained in:
2026-10-20 17:03:37 +08:00
parent 178cd2533c
commit 582242e9aa
144 changed files with 15759 additions and 406 deletions

View File

@@ -14,6 +14,7 @@ import 'package:maibu_satabot_v2/features/v2/workorder/presentation/routes/worko
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/pv_control/presentation/pages/pv_control_page.dart';
import '../../features/main_container/presentation/main_wrapper.dart';
import '../../main.dart'; // 🔥 导入 navigatorKey
import 'go_router_refresh_stream.dart';
@@ -67,6 +68,19 @@ GoRouter createRouter(AuthCubit authCubit) {
},
),
GoRoute(
path: RoutePaths.pvControl,
name: 'pvControl',
builder: (context, state) {
// extra: {'deviceId': String, 'deviceName': String?}
final extra = state.extra as Map<String, dynamic>? ?? {};
return PvControlPage(
deviceId: (extra['deviceId'] as String?) ?? '',
deviceName: extra['deviceName'] as String?,
);
},
),
GoRoute(
path: RoutePaths.home,
builder: (context, state) => const MainWrapper(),

View File

@@ -24,6 +24,9 @@ class RoutePaths {
static const machineDetails = '/machine_details/machine_details';
/// 光伏电站机器人远程控制(横屏大屏)页面
static const pvControl = '/pv_control';
/// 工单相关页面
static const workOrder = '/workorder';
static const workOrderDetail = '/workorder/detail/:orderId';