路径规划视频完成

This commit is contained in:
mmc
2026-03-09 12:41:55 +08:00
parent 6310a08278
commit 36def6006a
2 changed files with 11 additions and 12 deletions

View File

@@ -696,10 +696,10 @@ class _MapPageEnterpriseState extends State<MapPageEnterprise> {
_traceManager.reset(); _traceManager.reset();
// 5. 重新加载作业记录(保持数据最新) // 5. 重新加载作业记录(保持数据最新)
// final userId = context.read<AppUserCubit>().state.user?.userId ?? ""; // final userId = context.read<AppUserCubit>().state.user?.userId ?? "";
// if (userId.isNotEmpty) { // if (userId.isNotEmpty) {
// await context.read<DevicesCubit>().loadWorkRecords(userId); // await context.read<DevicesCubit>().loadWorkRecords(userId);
// } // }
if (savedCurrentLatLng != null) { if (savedCurrentLatLng != null) {
_mapController.move(savedCurrentLatLng, _mapController.camera?.zoom ?? 17); _mapController.move(savedCurrentLatLng, _mapController.camera?.zoom ?? 17);
@@ -876,8 +876,8 @@ class _MapPageEnterpriseState extends State<MapPageEnterprise> {
streamUrl: _videoStreamUrl, streamUrl: _videoStreamUrl,
width: 320, width: 320,
height: 180, height: 180,
showLeftPip: true, showLeftPip: false,
showRightPip: true, showRightPip: false,
onClose: _closeVideoDialog, // 关闭回调 onClose: _closeVideoDialog, // 关闭回调
), ),
), ),

View File

@@ -24,8 +24,8 @@ class WebRTCMapPlayer extends StatefulWidget {
super.key, super.key,
required this.streamUrl, required this.streamUrl,
required this.onClose, required this.onClose,
this.showLeftPip = true, this.showLeftPip = false,
this.showRightPip = true, this.showRightPip = false,
this.width = 320, // 默认宽度 this.width = 320, // 默认宽度
this.height = 180, // 默认高度(16:9比例) this.height = 180, // 默认高度(16:9比例)
}); });
@@ -259,7 +259,7 @@ class _WebRTCMapPlayerState extends State<WebRTCMapPlayer> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.black, color: Colors.black,
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.3), blurRadius: 15, offset: const Offset(0, 5))], boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.15), blurRadius: 2, offset: const Offset(0, 1))],
), ),
child: _isInitialized child: _isInitialized
? Stack( ? Stack(
@@ -276,9 +276,9 @@ class _WebRTCMapPlayerState extends State<WebRTCMapPlayer> {
child: Container( child: Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5), padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.black.withOpacity(0.5), // 半透明黑色背景 //color: Colors.black.withOpacity(0.5), // 半透明黑色背景
borderRadius: BorderRadius.circular(8), // 圆角效果 borderRadius: BorderRadius.circular(8), // 圆角效果
border: Border.all(color: Colors.white.withOpacity(0.3), width: 0.5), // 可选:加一层浅边框 //border: Border.all(color: Colors.white.withOpacity(0.3), width: 0.5), // 可选:加一层浅边框
), ),
child: Text( child: Text(
_getViewName(), _getViewName(),
@@ -318,4 +318,3 @@ class _WebRTCMapPlayerState extends State<WebRTCMapPlayer> {
); );
} }
} }