hyzp_ybqx-Commit056:已经调整步进speed = 2,已经初步实现球机放大缩小控制

master
WinUser01 4 years ago
parent 800417bd08
commit 38b1500372

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -146,6 +146,8 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
int btnCount = 4; // int btnCount = 4; //
int btnCount3 = listData.length; // int btnCount3 = listData.length; //
var mediaSize = MediaQuery.of(context).size; var mediaSize = MediaQuery.of(context).size;
double btn_left = 70; //
double btn_gap = 70; //
// //
double _outerRadius = 270; double _outerRadius = 270;
double _innerRadius = _outerRadius / 2; double _innerRadius = _outerRadius / 2;
@ -245,7 +247,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
? SizedBox.shrink() ? SizedBox.shrink()
: Row( : Row(
children: [ children: [
SizedBox(width: ScreenUtil().setWidth(347)), SizedBox(width: ScreenUtil().setWidth(btn_left)),
getRoundButton( getRoundButton(
//(bPlaying) ? '暂停' : '播放', //(bPlaying) ? '暂停' : '播放',
text: playerRegionProvide.playerText, text: playerRegionProvide.playerText,
@ -253,7 +255,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
diameter: 130, diameter: 130,
onPress: playOrPause, onPress: playOrPause,
), ),
SizedBox(width: ScreenUtil().setWidth(104)), SizedBox(width: ScreenUtil().setWidth(btn_gap)),
getRoundButton( getRoundButton(
text: '刷新', text: '刷新',
icon: Icons.autorenew, icon: Icons.autorenew,
@ -262,6 +264,35 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
restartPlay(urlnew); 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: () {
// 131112
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: () {
// 131112
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 12);
},
),
], ],
), ),
bFullScreen ? SizedBox.shrink() : SizedBox(height: ScreenUtil().setHeight(79)), bFullScreen ? SizedBox.shrink() : SizedBox(height: ScreenUtil().setHeight(79)),
@ -438,7 +469,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
_addLog('onStartFloatWindowPlay', {}); _addLog('onStartFloatWindowPlay', {});
} }
// //
Widget getRoundButton( Widget getRoundButton(
{double diameter = 144, {double diameter = 144,
double marginVer = 10, 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; bool bPlaying = true;
void playOrPause() { void playOrPause() {

Loading…
Cancel
Save