From bf1be3b9bdccf3e634ecf35adefee5dd5b9d2113 Mon Sep 17 00:00:00 2001 From: WinUser01 Date: Sat, 1 Jan 2022 21:06:32 +0800 Subject: [PATCH] =?UTF-8?q?hyzp=5Fybqx-Commit063=EF=BC=9A=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E8=BF=9D=E7=AB=A0=E8=A7=86=E9=A2=91=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E9=9B=A8=E5=88=B7=E3=80=81=E7=BC=A9=E6=94=BE?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/widget/my_superplayer.dart | 89 +++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 35 deletions(-) diff --git a/lib/widget/my_superplayer.dart b/lib/widget/my_superplayer.dart index 150370b..fbcc699 100644 --- a/lib/widget/my_superplayer.dart +++ b/lib/widget/my_superplayer.dart @@ -148,8 +148,11 @@ class _SuperPlayerPageState extends State with SuperPlayerListe int btnCount = 4; //每行按钮个数 int btnCount3 = listData.length; //每行按钮个数 var mediaSize = MediaQuery.of(context).size; - double btn_left = 70; //第一按钮行高度 - double btn_gap = 70; //第一按钮行高度 + + // widget.id:播放点位视频的点位编号,-2 表示播放违章视频 + double btn_left = -2 == widget.id ? 347 : 70; //第一按钮行高度 + double btn_gap = -2 == widget.id ? 104 : 70; //第一按钮行高度 + //远程控制球机方向按钮外半径和内半径 double _outerRadius = 270; double _innerRadius = _outerRadius / 2; @@ -266,38 +269,54 @@ class _SuperPlayerPageState extends State with SuperPlayerListe restartPlay(urlnew); }, ), - SizedBox(width: ScreenUtil().setWidth(btn_gap)), - getRoundButton_image( - text: '雨刷', - image_path: 'assets/images/wiper.png', - diameter: 130, - onPress: () { - // 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小 - setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 3); - }, - ), - SizedBox(width: ScreenUtil().setWidth(btn_gap)), - getRoundButton_image( - text: '放大', - image_path: 'assets/images/zoom_in.png', - imageSize: 72, - diameter: 130, - onPress: () { - // 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小 - setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 11); - }, - ), - SizedBox(width: ScreenUtil().setWidth(btn_gap)), - getRoundButton_image( - text: '缩小', - image_path: 'assets/images/zoom_out.png', - imageSize: 72, - diameter: 130, - onPress: () { - // 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小 - setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 12); - }, - ), + // widget.id:播放点位视频的点位编号,-2 表示播放违章视频 + -2 == widget.id + ? SizedBox.shrink() + : SizedBox(width: ScreenUtil().setWidth(btn_gap)), + -2 == widget.id + ? SizedBox.shrink() + : getRoundButton_image( + text: '雨刷', + image_path: 'assets/images/wiper.png', + diameter: 130, + onPress: () { + // 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小 + setSphericalCameraDio( + id: widget.id, dwip: widget.dwip, cmdCode: 3); + }, + ), + -2 == widget.id + ? SizedBox.shrink() + : SizedBox(width: ScreenUtil().setWidth(btn_gap)), + -2 == widget.id + ? SizedBox.shrink() + : getRoundButton_image( + text: '放大', + image_path: 'assets/images/zoom_in.png', + imageSize: 72, + diameter: 130, + onPress: () { + // 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小 + setSphericalCameraDio( + id: widget.id, dwip: widget.dwip, cmdCode: 11); + }, + ), + -2 == widget.id + ? SizedBox.shrink() + : SizedBox(width: ScreenUtil().setWidth(btn_gap)), + -2 == widget.id + ? SizedBox.shrink() + : getRoundButton_image( + text: '缩小', + image_path: 'assets/images/zoom_out.png', + imageSize: 72, + diameter: 130, + onPress: () { + // 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小 + setSphericalCameraDio( + id: widget.id, dwip: widget.dwip, cmdCode: 12); + }, + ), ], ), bFullScreen ? SizedBox.shrink() : SizedBox(height: ScreenUtil().setHeight(79)), @@ -312,7 +331,7 @@ class _SuperPlayerPageState extends State with SuperPlayerListe // 进行像素单位转换,解决按钮响应错乱问题 innerRadius: _innerRadius / ScreenUtil().pixelRatio, outerRadius: _outerRadius / ScreenUtil().pixelRatio, - callback: -2 == widget.id + callback: -2 == widget.id // 播放点位视频的点位编号,-2 表示播放违章视频 ? null : (status) { ///点击回调