fix(ui): 加入歌单弹层不再被迷你播放器遮挡
原因:迷你播放器挂在 Navigator overlay 上,层级高于底部弹层, 弹层里的歌单列表被它盖住,看起来像"没读到歌单"。 (日志确认查询正常:读到 1 个歌单) - RouteManager 抽到 services/route_manager.dart,新增临时隐藏开关 - 打开"加入歌单"弹层时隐藏迷你播放器,关闭后恢复 - main.dart 的 shouldShow 改用 showMiniPlayer(原来直接读路由,开关不生效) - 弹层底部加 SafeArea minimum + 16px 余量,不再贴着手势区 真机验证:弹层正常显示 "TL / 1 首",底部留出安全距离。
This commit is contained in:
@@ -436,9 +436,18 @@ class _HomePageState extends BaseState<HomePage> {
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
final song = _favorites[index];
|
||||
return AnimatedOpacity(
|
||||
opacity: 1.0,
|
||||
duration: const Duration(milliseconds: 150),
|
||||
return TweenAnimationBuilder<double>(
|
||||
key: ValueKey('fav-$_homeTab-$index'),
|
||||
tween: Tween(begin: 0.0, end: 1.0),
|
||||
duration: const Duration(milliseconds: 240),
|
||||
curve: Curves.easeOutCubic,
|
||||
builder: (context, t, child) => Opacity(
|
||||
opacity: t,
|
||||
child: Transform.translate(
|
||||
offset: Offset(0, (1 - t) * 10),
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 2),
|
||||
child: ListTile(
|
||||
@@ -515,8 +524,20 @@ class _HomePageState extends BaseState<HomePage> {
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
final playlist = _playlistSummaries[index];
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 2),
|
||||
return TweenAnimationBuilder<double>(
|
||||
key: ValueKey('pl-$_homeTab-$index'),
|
||||
tween: Tween(begin: 0.0, end: 1.0),
|
||||
duration: const Duration(milliseconds: 240),
|
||||
curve: Curves.easeOutCubic,
|
||||
builder: (context, t, child) => Opacity(
|
||||
opacity: t,
|
||||
child: Transform.translate(
|
||||
offset: Offset(0, (1 - t) * 10),
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 2),
|
||||
child: ListTile(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
visualDensity: VisualDensity.compact,
|
||||
@@ -561,7 +582,8 @@ class _HomePageState extends BaseState<HomePage> {
|
||||
if (mounted) safeSetState(() {});
|
||||
},
|
||||
),
|
||||
);
|
||||
),
|
||||
);
|
||||
},
|
||||
childCount: _playlistSummaries.length,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user