|
|
@@ -154,7 +154,6 @@ class _CupertinoControlsState extends State<CupertinoControls> {
|
|
|
_buildRemaining(iconColor)
|
|
|
],
|
|
|
),
|
|
|
-
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
@@ -496,6 +495,8 @@ class _CupertinoControlsState extends State<CupertinoControls> {
|
|
|
}
|
|
|
|
|
|
void _playPause() {
|
|
|
+ bool isFinished = _latestValue.position >= _latestValue.duration;
|
|
|
+
|
|
|
setState(() {
|
|
|
if (controller.value.isPlaying) {
|
|
|
_hideStuff = false;
|
|
|
@@ -509,6 +510,9 @@ class _CupertinoControlsState extends State<CupertinoControls> {
|
|
|
controller.play();
|
|
|
});
|
|
|
} else {
|
|
|
+ if (isFinished) {
|
|
|
+ controller.seekTo(Duration(seconds: 0));
|
|
|
+ }
|
|
|
controller.play();
|
|
|
}
|
|
|
}
|