M1.1 收尾: - 24项 P0/P1/P2 bug 修复 (Rust 107 tests + Flutter 15 tests) - Flutter App v0.3: cupertino_icons 修复, 单元测试, 调试面板, APK 52.6MB - 示例插件完善: manifest.json + 请求/响应示范 + 7个测试 - API 文档重写 (以 routes.rs 为唯一权威) - MILESTONES.md 更新至 100% M1.2 启动: - P0: 插件管理 API 闭环 (handle_manager_message Custom 分支 + broadcast_plugin_states) - ServiceManager 集成测试 8/8 (tests/m1_2_service_manager.rs) - M1.2 测试计划 (docs/M1.2_TEST_PLAN.md, 18个E2E场景) - 动态插件系统: auto_rollback + version_manager GC + 路径穿越防护 总计: Rust 115/115 测试, Flutter 15/15 测试, 零 warning Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
64 lines
1.8 KiB
Dart
64 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
import '../widgets/connection_status_banner.dart';
|
|
|
|
class AppShell extends StatelessWidget {
|
|
const AppShell({required this.navigationShell, super.key});
|
|
|
|
final StatefulNavigationShell navigationShell;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Column(
|
|
children: [
|
|
const ConnectionStatusBanner(),
|
|
Expanded(child: navigationShell),
|
|
],
|
|
),
|
|
bottomNavigationBar: NavigationBar(
|
|
selectedIndex: navigationShell.currentIndex,
|
|
onDestinationSelected: (index) {
|
|
navigationShell.goBranch(
|
|
index,
|
|
initialLocation: index == navigationShell.currentIndex,
|
|
);
|
|
},
|
|
destinations: const [
|
|
NavigationDestination(
|
|
icon: Icon(Icons.home_outlined),
|
|
selectedIcon: Icon(Icons.home),
|
|
label: '首页',
|
|
),
|
|
NavigationDestination(
|
|
icon: Icon(Icons.play_circle_outline),
|
|
selectedIcon: Icon(Icons.play_circle),
|
|
label: '播放',
|
|
),
|
|
NavigationDestination(
|
|
icon: Icon(Icons.bolt_outlined),
|
|
selectedIcon: Icon(Icons.bolt),
|
|
label: '触发',
|
|
),
|
|
NavigationDestination(
|
|
icon: Icon(Icons.wifi_outlined),
|
|
selectedIcon: Icon(Icons.wifi),
|
|
label: '网络',
|
|
),
|
|
NavigationDestination(
|
|
icon: Icon(Icons.settings_outlined),
|
|
selectedIcon: Icon(Icons.settings),
|
|
label: '设置',
|
|
),
|
|
NavigationDestination(
|
|
icon: Icon(Icons.bug_report_outlined),
|
|
selectedIcon: Icon(Icons.bug_report),
|
|
label: '调试',
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|