File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -364,7 +364,8 @@ class _MaterialControlsState extends State<MaterialControls>
364
364
}
365
365
366
366
Widget _buildHitArea () {
367
- final bool isFinished = _latestValue.position >= _latestValue.duration;
367
+ final bool isFinished = (_latestValue.position >= _latestValue.duration) &&
368
+ _latestValue.duration.inSeconds > 0 ;
368
369
final bool showPlayButton =
369
370
widget.showPlayButton && ! _dragging && ! notifier.hideStuff;
370
371
@@ -519,7 +520,8 @@ class _MaterialControlsState extends State<MaterialControls>
519
520
}
520
521
521
522
void _playPause () {
522
- final isFinished = _latestValue.position >= _latestValue.duration;
523
+ final bool isFinished = (_latestValue.position >= _latestValue.duration) &&
524
+ _latestValue.duration.inSeconds > 0 ;
523
525
524
526
setState (() {
525
527
if (controller.value.isPlaying) {
You can’t perform that action at this time.
0 commit comments