I dont get it but it is working with loop
parent
37b941cdd1
commit
c0eec7e23d
|
@ -89,6 +89,7 @@ class _IntervalTimerPageState extends State<IntervalTimerPage> {
|
||||||
Future<void> _playWorkoutMusic() async {
|
Future<void> _playWorkoutMusic() async {
|
||||||
await warmUpPlayer.stop();
|
await warmUpPlayer.stop();
|
||||||
Future.delayed(const Duration(microseconds: 600)).then((value) async {
|
Future.delayed(const Duration(microseconds: 600)).then((value) async {
|
||||||
|
await workoutPlayer.setReleaseMode(ReleaseMode.loop);
|
||||||
await workoutPlayer.play(UrlSource('assets/workout.mp3'));
|
await workoutPlayer.play(UrlSource('assets/workout.mp3'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -124,6 +125,7 @@ class _IntervalTimerPageState extends State<IntervalTimerPage> {
|
||||||
_currentDuration = _cooldownDuration;
|
_currentDuration = _cooldownDuration;
|
||||||
() async {
|
() async {
|
||||||
await workoutPlayer.stop();
|
await workoutPlayer.stop();
|
||||||
|
await coolDownPlayer.setReleaseMode(ReleaseMode.loop);
|
||||||
await coolDownPlayer.play(UrlSource('assets/cool_down.mp3'));
|
await coolDownPlayer.play(UrlSource('assets/cool_down.mp3'));
|
||||||
}();
|
}();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue