提交 2a47428a authored 作者: jungleiOS's avatar jungleiOS

修改默认进度条颜色与默认音量调节值及控制栏组件

上级 cf73c8ed
...@@ -24,45 +24,46 @@ class VideoControlBarStyle { ...@@ -24,45 +24,46 @@ class VideoControlBarStyle {
Icons.play_circle_outline, Icons.play_circle_outline,
size: iconSize, size: iconSize,
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
semanticLabel: "播放", semanticLabel: '播放',
), ),
this.pauseIcon = const Icon( this.pauseIcon = const Icon(
Icons.pause_circle_outline, Icons.pause_circle_outline,
size: iconSize, size: iconSize,
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
semanticLabel: "暂停", semanticLabel: '暂停',
), ),
this.rewindIcon = const Icon( this.rewindIcon = const Icon(
Icons.fast_rewind, Icons.fast_rewind,
size: iconSize, size: iconSize,
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
semanticLabel: "快退", semanticLabel: '快退',
), ),
this.forwardIcon = const Icon( this.forwardIcon = const Icon(
Icons.fast_forward, Icons.fast_forward,
size: iconSize, size: iconSize,
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
semanticLabel: "快进", semanticLabel: '快进',
), ),
this.fullscreenIcon = const Icon( this.fullscreenIcon = const Icon(
Icons.fullscreen, Icons.fullscreen,
size: iconSize, size: iconSize,
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
semanticLabel: "全屏", semanticLabel: '全屏',
), ),
this.fullscreenExitIcon = const Icon( this.fullscreenExitIcon = const Icon(
Icons.fullscreen_exit, Icons.fullscreen_exit,
size: iconSize, size: iconSize,
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
semanticLabel: "退出全屏", semanticLabel: '退出全屏',
), ),
this.itemList = const [ this.itemList = const [
"rewind", 'rewind',
"play", 'play',
"forward", 'forward',
"progress", 'progress',
"time", 'time',
"fullscreen" 'speed'
'fullscreen'
], ],
}) : progressStyle = progressStyle ?? VideoProgressStyle(); }) : progressStyle = progressStyle ?? VideoProgressStyle();
......
...@@ -8,7 +8,7 @@ class VideoPlayOptions { ...@@ -8,7 +8,7 @@ class VideoPlayOptions {
this.loop = false, this.loop = false,
this.seekSeconds = 15, this.seekSeconds = 15,
this.progressGestureUnit = 1000, this.progressGestureUnit = 1000,
this.volumeGestureUnit = 0.001, this.volumeGestureUnit = 0.005,
this.brightnessGestureUnit = 0.005, this.brightnessGestureUnit = 0.005,
this.autoplay = true, this.autoplay = true,
this.allowScrubbing = true, this.allowScrubbing = true,
......
...@@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; ...@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
class VideoProgressStyle { class VideoProgressStyle {
VideoProgressStyle({ VideoProgressStyle({
this.padding = const EdgeInsets.symmetric(vertical: 8, horizontal: 10), this.padding = const EdgeInsets.symmetric(vertical: 8, horizontal: 10),
this.playedColor = const Color.fromRGBO(255, 0, 0, 0.7), this.playedColor = const Color.fromRGBO(0, 78, 162, 1),
this.bufferedColor = const Color.fromRGBO(50, 50, 200, 0.2), this.bufferedColor = const Color.fromRGBO(50, 50, 200, 0.2),
this.backgroundColor = const Color.fromRGBO(200, 200, 200, 0.5), this.backgroundColor = const Color.fromRGBO(200, 200, 200, 0.5),
this.dragBarColor = const Color.fromRGBO(255, 255, 255, 1), this.dragBarColor = const Color.fromRGBO(255, 255, 255, 1),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论