Add player skeleton and playback service

This introduces a dependency on audio_service and implements the
playback service using that package. The UI was adapted to the new
interface.
This commit is contained in:
Elias Projahn 2020-04-18 13:50:38 +02:00
parent e0fc60f9eb
commit 3471fcf78b
31 changed files with 321 additions and 44 deletions

View file

@ -93,13 +93,13 @@ class _ContentState extends State<Content> with SingleTickerProviderStateMixin {
super.didChangeDependencies();
backend = Backend.of(context);
playerBarAnimation.value = backend.playerActive.value ? 1.0 : 0.0;
playerBarAnimation.value = backend.player.active.value ? 1.0 : 0.0;
if (playerActiveSubscription != null) {
playerActiveSubscription.cancel();
}
playerActiveSubscription = backend.playerActive.listen((active) =>
playerActiveSubscription = backend.player.active.listen((active) =>
active ? playerBarAnimation.forward() : playerBarAnimation.reverse());
}