🐛 Player text scroll bug

Change filename in download
This commit is contained in:
stonegate 2020-06-05 01:13:29 +08:00
parent b45c7e3a5b
commit 137fe58183
3 changed files with 13 additions and 11 deletions

View File

@ -22,7 +22,7 @@ class _AudioPanelState extends State<AudioPanel>
void initState() {
initSize = minSize;
_controller =
AnimationController(vsync: this, duration: Duration(milliseconds: 100))
AnimationController(vsync: this, duration: Duration(milliseconds: 50))
..addListener(() {
setState(() {});
});
@ -83,9 +83,10 @@ class _AudioPanelState extends State<AudioPanel>
BoxShadow(
offset: Offset(0, -0.5),
blurRadius: 1,
color: Theme.of(context).brightness == Brightness.light
? Colors.grey[400].withOpacity(0.5)
: Colors.grey[800],
color:
Theme.of(context).brightness == Brightness.light
? Colors.grey[400].withOpacity(0.5)
: Colors.grey[800],
),
],
),
@ -136,7 +137,7 @@ class _AudioPanelState extends State<AudioPanel>
}
_end() {
if (_animation.value >= (maxSize + minSize) / 2.2 &&
if (_animation.value >= (maxSize + minSize) / 4 &&
_animation.value < maxSize) {
setState(() {
_animation = Tween<double>(begin: _animation.value, end: maxSize)
@ -144,7 +145,7 @@ class _AudioPanelState extends State<AudioPanel>
initSize = maxSize;
});
_controller.forward();
} else if (_animation.value < (maxSize + minSize) / 2.2 &&
} else if (_animation.value < (maxSize + minSize) / 4 &&
_animation.value > minSize) {
setState(() {
_animation = Tween<double>(begin: _animation.value, end: minSize)

View File

@ -456,7 +456,7 @@ class _PlayerWidgetState extends State<PlayerWidget> {
BasicPlaybackState.skippingToNext ||
data.item1 == BasicPlaybackState.stopped
? Text(
'Buffring...',
'Buffering...',
style: TextStyle(
color: Theme.of(context).accentColor),
)
@ -1361,13 +1361,13 @@ class _ControlPanelState extends State<ControlPanel>
crossAxisAlignment: CrossAxisAlignment.start,
blankSpace: 30.0,
velocity: 50.0,
pauseAfterRound: Duration(seconds: 1),
pauseAfterRound: Duration.zero,
startPadding: 30.0,
accelerationDuration: Duration(seconds: 1),
accelerationDuration: Duration(milliseconds: 100),
accelerationCurve: Curves.linear,
decelerationDuration:
Duration(milliseconds: 500),
decelerationCurve: Curves.easeOut,
Duration(milliseconds: 100),
decelerationCurve: Curves.linear,
);
} else {
return Text(

View File

@ -132,6 +132,7 @@ class DownloadState extends ChangeNotifier {
saveDir.create();
}
String taskId = await FlutterDownloader.enqueue(
fileName: episode.enclosureUrl.split('/').last,
url: episode.enclosureUrl,
savedDir: localPath,
showNotification: true,