mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 10:47:25 +01:00
Reach initial values without animation
This commit is contained in:
parent
03fb8b2c49
commit
d18fd880ed
2 changed files with 6 additions and 2 deletions
|
|
@ -33,6 +33,7 @@ class _AppState extends State<App> with SingleTickerProviderStateMixin {
|
|||
super.didChangeDependencies();
|
||||
|
||||
backend = Backend.of(context);
|
||||
playerBarAnimation.value = backend.playerActive.value ? 1.0 : 0.0;
|
||||
|
||||
if (playerActiveSubscription != null) {
|
||||
playerActiveSubscription.cancel();
|
||||
|
|
|
|||
|
|
@ -19,8 +19,10 @@ class _PlayPauseButtonState extends State<PlayPauseButton>
|
|||
void initState() {
|
||||
super.initState();
|
||||
|
||||
playPauseAnimation =
|
||||
AnimationController(vsync: this, duration: Duration(milliseconds: 300));
|
||||
playPauseAnimation = AnimationController(
|
||||
vsync: this,
|
||||
duration: Duration(milliseconds: 300),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -28,6 +30,7 @@ class _PlayPauseButtonState extends State<PlayPauseButton>
|
|||
super.didChangeDependencies();
|
||||
|
||||
backend = Backend.of(context);
|
||||
playPauseAnimation.value = backend.playing.value ? 1.0 : 0.0;
|
||||
|
||||
if (playingSubscription != null) {
|
||||
playingSubscription.cancel();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue