From 8610f18ff79971abf0c9a8aad9e466a6e569b975 Mon Sep 17 00:00:00 2001 From: zarzet Date: Mon, 13 Jul 2026 20:57:41 +0700 Subject: [PATCH] fix(player): dissolve the sheet while it slides down on close After the content fade, popping left an empty dark scaffold traveling the full screen. The sheet now fades out over the second half of the pop; opening and dragging keep it fully opaque. --- lib/screens/now_playing_screen.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/screens/now_playing_screen.dart b/lib/screens/now_playing_screen.dart index a5a2a023..b5ae9985 100644 --- a/lib/screens/now_playing_screen.dart +++ b/lib/screens/now_playing_screen.dart @@ -96,11 +96,17 @@ class NowPlayingRoute extends PageRoute { curve: Easing.emphasizedDecelerate, reverseCurve: Easing.emphasizedAccelerate, ); + // On pop the content has already faded out, so dissolve the sheet on its + // way down instead of sliding an empty dark surface across the screen. + // Forward (open) and drag keep the sheet fully opaque. + final opacity = animation.status == AnimationStatus.reverse + ? CurvedAnimation(parent: animation, curve: const Interval(0.0, 0.5)) + : const AlwaysStoppedAnimation(1.0); return SlideTransition( position: position.drive( Tween(begin: const Offset(0, 1), end: Offset.zero), ), - child: child, + child: FadeTransition(opacity: opacity, child: child), ); } }