|
|
@@ -118,6 +118,7 @@ class MaterialControlsState extends State<I2MaterialControls> {
|
|
|
if (_verticalMode != null && endDy != null && startDy != null) {
|
|
|
double value;
|
|
|
if (_verticalMode == VerticalMode.Bright) {
|
|
|
+ if (currentBright == null) return;
|
|
|
if (endDy > startDy) {
|
|
|
// 降低操作 竖屏环境?????
|
|
|
value = (currentBright - (endDy - startDy) / MediaQuery.of(context).size.height) < 0
|
|
|
@@ -131,6 +132,7 @@ class MaterialControlsState extends State<I2MaterialControls> {
|
|
|
}
|
|
|
Screen.setBrightness(value);
|
|
|
} else {
|
|
|
+ if (currentVolume == null) return;
|
|
|
if (endDy > startDy) {
|
|
|
// 降低操作 竖屏环境?????
|
|
|
value = (currentVolume - (endDy - startDy) / MediaQuery.of(context).size.height) < 0
|
|
|
@@ -382,12 +384,17 @@ class MaterialControlsState extends State<I2MaterialControls> {
|
|
|
// height: 44.0 + MediaQuery.of(context).padding.top != 0 ? MediaQuery.of(context).padding.top : 0,
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
// margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top != 0 ? MediaQuery.of(context).padding.top : 0),
|
|
|
- padding: EdgeInsets.only(left: 13,),
|
|
|
child: Row(
|
|
|
children: <Widget>[
|
|
|
GestureDetector(
|
|
|
onTap: onTapBack,
|
|
|
- child: Image(image: AssetImage("assets/dub_user_play/zuojiantou.png", package: 'chewie'), width: 20, height: 20,)
|
|
|
+ behavior: HitTestBehavior.opaque,
|
|
|
+ child: Container(
|
|
|
+ alignment: Alignment.center,
|
|
|
+ width: 50,
|
|
|
+ height: 40,
|
|
|
+ child: Image(image: AssetImage("assets/dub_user_play/zuojiantou.png", package: 'chewie'), width: 20, height: 20,),
|
|
|
+ )
|
|
|
),
|
|
|
],
|
|
|
)
|
|
|
@@ -704,35 +711,37 @@ class MaterialControlsState extends State<I2MaterialControls> {
|
|
|
|
|
|
Widget _buildProgressBar() {
|
|
|
return Expanded(
|
|
|
- child: MaterialVideoProgressBar(
|
|
|
- controller,
|
|
|
- onDragStart: () {
|
|
|
- setState(() {
|
|
|
- _dragging = true;
|
|
|
- });
|
|
|
+ child: Padding(
|
|
|
+ padding: EdgeInsets.only(bottom: 3),
|
|
|
+ child: MaterialVideoProgressBar(
|
|
|
+ controller,
|
|
|
+ onDragStart: () {
|
|
|
+ setState(() {
|
|
|
+ _dragging = true;
|
|
|
+ });
|
|
|
|
|
|
- _hideTimer?.cancel();
|
|
|
- },
|
|
|
- onDragEnd: () {
|
|
|
- setState(() {
|
|
|
- _dragging = false;
|
|
|
- });
|
|
|
+ _hideTimer?.cancel();
|
|
|
+ },
|
|
|
+ onDragEnd: () {
|
|
|
+ setState(() {
|
|
|
+ _dragging = false;
|
|
|
+ });
|
|
|
|
|
|
- _startHideTimer();
|
|
|
- },
|
|
|
- colors: chewieController.materialProgressColors ??
|
|
|
- ChewieProgressColors(
|
|
|
- playedColor: Color(0xFFC7000B),
|
|
|
- handleColor: Color(0xFFC7000B),
|
|
|
- bufferedColor: Color(0x5AC7000B),
|
|
|
- backgroundColor: Color(0x5AFFFFFF)),
|
|
|
- millionSec: updateDragDuration?.inMilliseconds,
|
|
|
+ _startHideTimer();
|
|
|
+ },
|
|
|
+ colors: chewieController.materialProgressColors ??
|
|
|
+ ChewieProgressColors(
|
|
|
+ playedColor: Color(0xFFEF765E),
|
|
|
+ handleColor: Color(0xFFEF765E),
|
|
|
+ bufferedColor: Color(0x5AEF765E),
|
|
|
+ backgroundColor: Color(0x5AFFFFFF)),
|
|
|
+ millionSec: updateDragDuration?.inMilliseconds,
|
|
|
+ ),
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
|
|
|
void onTapBack() {
|
|
|
- print("onTapBack");
|
|
|
if (chewieController.isFullScreen) {
|
|
|
chewieController.toggleFullScreen();
|
|
|
} else {
|