File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,8 @@ class _CupertinoControlsState extends State<CupertinoControls>
346
346
}
347
347
348
348
Widget _buildHitArea () {
349
- final bool isFinished = _latestValue.position >= _latestValue.duration;
349
+ final bool isFinished = (_latestValue.position >= _latestValue.duration) &&
350
+ _latestValue.duration.inSeconds > 0 ;
350
351
final bool showPlayButton =
351
352
widget.showPlayButton && ! _latestValue.isPlaying && ! _dragging;
352
353
@@ -726,7 +727,8 @@ class _CupertinoControlsState extends State<CupertinoControls>
726
727
}
727
728
728
729
void _playPause () {
729
- final isFinished = _latestValue.position >= _latestValue.duration;
730
+ final isFinished = _latestValue.position >= _latestValue.duration &&
731
+ _latestValue.duration.inSeconds > 0 ;
730
732
731
733
setState (() {
732
734
if (controller.value.isPlaying) {
Original file line number Diff line number Diff line change @@ -327,7 +327,8 @@ class _MaterialDesktopControlsState extends State<MaterialDesktopControls>
327
327
}
328
328
329
329
Widget _buildHitArea () {
330
- final bool isFinished = _latestValue.position >= _latestValue.duration;
330
+ final bool isFinished = _latestValue.position >= _latestValue.duration &&
331
+ _latestValue.duration.inSeconds > 0 ;
331
332
final bool showPlayButton =
332
333
widget.showPlayButton && ! _dragging && ! notifier.hideStuff;
333
334
You can’t perform that action at this time.
0 commit comments