feat(player): expand transition from mini player with drag-to-dismiss

Slide-up route with M3 emphasized easing, live finger-tracking dismissal
on the app bar and artwork, and a shared-element Hero on the artwork so
the mini player cover grows into the full player.
This commit is contained in:
zarzet
2026-07-14 09:09:48 +07:00
parent 3cf9418f47
commit 702fc9825e
2 changed files with 157 additions and 27 deletions
+14 -16
View File
@@ -35,12 +35,7 @@ class MiniPlayer extends ConsumerWidget {
color: settingsGroupColor(context).withValues(alpha: 0.72),
child: InkWell(
onTap: () {
Navigator.of(context, rootNavigator: true).push(
MaterialPageRoute<void>(
builder: (_) => const NowPlayingScreen(),
fullscreenDialog: true,
),
);
Navigator.of(context, rootNavigator: true).push(NowPlayingRoute());
},
child: Column(
mainAxisSize: MainAxisSize.min,
@@ -54,16 +49,19 @@ class MiniPlayer extends ConsumerWidget {
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
child: Row(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(6),
child: SizedBox(
width: 44,
height: 44,
child: PlayerArtwork(
artUri: mediaItem.artUri?.toString(),
colorScheme: colorScheme,
cacheWidth: 132,
iconSize: 22,
Hero(
tag: kNowPlayingArtworkHeroTag,
child: ClipRRect(
borderRadius: BorderRadius.circular(6),
child: SizedBox(
width: 44,
height: 44,
child: PlayerArtwork(
artUri: mediaItem.artUri?.toString(),
colorScheme: colorScheme,
cacheWidth: 132,
iconSize: 22,
),
),
),
),