对接路径规划的列表(根据场站的下的)
优化无人机机场的监控视频的显示视频流畅度提升80% 添加首页tcp指示灯的机器状态信息展示功能。(暂不支持在此页面上设备的切换显示)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:maibu_satabot_v2/components/tcp_status_indicator.dart';
|
||||
import 'package:maibu_satabot_v2/components/device_status_modal.dart';
|
||||
import 'package:maibu_satabot_v2/features/ai/presentation/pages/ai_page.dart';
|
||||
import 'package:maibu_satabot_v2/features/home/presentation/pages/home_page.dart';
|
||||
import 'package:maibu_satabot_v2/features/my/presentation/pages/my_page.dart';
|
||||
@@ -12,6 +13,7 @@ import 'package:maibu_satabot_v2/features/v2/workorder/presentation/pages/workor
|
||||
import 'package:maibu_satabot_v2/features/v2/report/presentation/pages/report_page.dart';
|
||||
|
||||
import '../../../v2/waring_center/presentation/pages/alarm_center_page.dart';
|
||||
import 'package:maibu_satabot_v2/features/devices/presentation/bloc/device_status_bloc.dart';
|
||||
|
||||
class CustomMainContainer extends StatefulWidget {
|
||||
const CustomMainContainer({super.key});
|
||||
@@ -60,29 +62,33 @@ class _CustomMainContainerState extends State<CustomMainContainer>
|
||||
index: currentIndex,
|
||||
children: _buildPages(enabledTabs),
|
||||
),
|
||||
// TCP状态指示灯 - 右上角,带白色背景确保可见
|
||||
// TCP状态指示灯 - 右上角,带白色背景确保可见,点击弹出设备状态模态框
|
||||
Positioned(
|
||||
top: 40,
|
||||
right: 16,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8,
|
||||
vertical: 4,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.5), // 透明灰色背景
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
TcpStatusIndicator(size: 12),
|
||||
const SizedBox(width: 6),
|
||||
const Text(
|
||||
'TCP',
|
||||
style: TextStyle(fontSize: 12, color: Colors.white),
|
||||
),
|
||||
],
|
||||
child: InkWell(
|
||||
onTap: () => _showDeviceStatusModal(context),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8,
|
||||
vertical: 4,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.5), // 透明灰色背景
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
TcpStatusIndicator(size: 12),
|
||||
const SizedBox(width: 6),
|
||||
const Text(
|
||||
'TCP',
|
||||
style: TextStyle(fontSize: 12, color: Colors.white),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -139,4 +145,25 @@ class _CustomMainContainerState extends State<CustomMainContainer>
|
||||
}
|
||||
}).toList();
|
||||
}
|
||||
|
||||
// 显示设备状态模态框 - 从底部滑出
|
||||
void _showDeviceStatusModal(BuildContext context) {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(16),
|
||||
topRight: Radius.circular(16),
|
||||
),
|
||||
),
|
||||
builder: (BuildContext context) {
|
||||
return BlocProvider.value(
|
||||
value: context.read<DeviceStatusBloc>(),
|
||||
child: const DeviceStatusModal(),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user