|
|
|
|
@ -146,6 +146,8 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|
|
|
|
int btnCount = 4; //每行按钮个数
|
|
|
|
|
int btnCount3 = listData.length; //每行按钮个数
|
|
|
|
|
var mediaSize = MediaQuery.of(context).size;
|
|
|
|
|
double btn_left = 70; //第一按钮行高度
|
|
|
|
|
double btn_gap = 70; //第一按钮行高度
|
|
|
|
|
//远程控制球机方向按钮外半径和内半径
|
|
|
|
|
double _outerRadius = 270;
|
|
|
|
|
double _innerRadius = _outerRadius / 2;
|
|
|
|
|
@ -245,7 +247,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|
|
|
|
? SizedBox.shrink()
|
|
|
|
|
: Row(
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(347)),
|
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(btn_left)),
|
|
|
|
|
getRoundButton(
|
|
|
|
|
//(bPlaying) ? '暂停' : '播放',
|
|
|
|
|
text: playerRegionProvide.playerText,
|
|
|
|
|
@ -253,7 +255,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|
|
|
|
diameter: 130,
|
|
|
|
|
onPress: playOrPause,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(104)),
|
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(btn_gap)),
|
|
|
|
|
getRoundButton(
|
|
|
|
|
text: '刷新',
|
|
|
|
|
icon: Icons.autorenew,
|
|
|
|
|
@ -262,6 +264,35 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|
|
|
|
restartPlay(urlnew);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: ScreenUtil().setWidth(btn_gap)),
|
|
|
|
|
getRoundButton_image(
|
|
|
|
|
text: '雨刷',
|
|
|
|
|
image_path: 'assets/images/wiper.png',
|
|
|
|
|
diameter: 130,
|
|
|
|
|
onPress: () {},
|
|
|
|
|
),
|
|
|
|
|
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);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
bFullScreen ? SizedBox.shrink() : SizedBox(height: ScreenUtil().setHeight(79)),
|
|
|
|
|
@ -438,7 +469,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|
|
|
|
_addLog('onStartFloatWindowPlay', {});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//生成圆形按钮部件
|
|
|
|
|
//生成圆形按钮部件,基于图标
|
|
|
|
|
Widget getRoundButton(
|
|
|
|
|
{double diameter = 144,
|
|
|
|
|
double marginVer = 10,
|
|
|
|
|
@ -474,6 +505,47 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//生成圆形按钮部件,基于图片
|
|
|
|
|
Widget getRoundButton_image(
|
|
|
|
|
{double diameter = 144,
|
|
|
|
|
double marginVer = 10,
|
|
|
|
|
String text,
|
|
|
|
|
String image_path,
|
|
|
|
|
double fontSize = 16,
|
|
|
|
|
double imageSize = 90,
|
|
|
|
|
Color color = const Color.fromRGBO(52, 157, 237, 1),
|
|
|
|
|
var onPress}) {
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: onPress,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: ScreenUtil().setWidth(diameter),
|
|
|
|
|
height: ScreenUtil().setHeight(diameter),
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
child: Image.asset(image_path,
|
|
|
|
|
fit: BoxFit.fitWidth,
|
|
|
|
|
width: ScreenUtil().setWidth(imageSize),
|
|
|
|
|
//height: ScreenUtil().setWidth(iconSize),
|
|
|
|
|
color: Color.fromRGBO(52, 157, 237, 1)),
|
|
|
|
|
// child: Icon(
|
|
|
|
|
// icon,
|
|
|
|
|
// size: ScreenUtil().setWidth(iconSize),
|
|
|
|
|
// color: Color.fromRGBO(52, 157, 237, 1),
|
|
|
|
|
// ),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(200)),
|
|
|
|
|
border: Border.all(width: 0, style: BorderStyle.none),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: ScreenUtil().setHeight(marginVer)),
|
|
|
|
|
Text(text, style: TextStyle(fontSize: fontSize, color: Color.fromRGBO(139, 139, 139, 1))),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool bPlaying = true;
|
|
|
|
|
|
|
|
|
|
void playOrPause() {
|
|
|
|
|
|