fix(flutter): feed rail 底部对齐并复用播放页更多

This commit is contained in:
Zhou Weidong committed 2026-10-20 14:23:36 +08:00
1 parent e800f5971f
commit 7e415f6f4f
5 files changed
+15 -86

No files matched your search

@@ -56,6 +56,7 @@ class HomeFeedOverlay extends StatefulWidget {
required this.onDownload,
required this.onClear,
required this.onSearch,
required this.onMore,
required this.onTogglePlay,
required this.onBoostStart,
required this.onBoostEnd,
@@ -65,7 +66,6 @@ class HomeFeedOverlay extends StatefulWidget {
this.favoriteCount,
this.commentCount,
this.authorNote = '',
this.onPip,
});
final AppLocalizations l10n;
@@ -91,8 +91,8 @@ class HomeFeedOverlay extends StatefulWidget {
final VoidCallback onDownload;
final VoidCallback onClear;
final VoidCallback onSearch;
final VoidCallback onMore;
final VoidCallback onTogglePlay;
final VoidCallback? onPip;
final VoidCallback? onScrubStart;
final ValueChanged<Duration>? onSeek;
final VoidCallback onBoostStart;
@@ -137,9 +137,9 @@ class _HomeFeedOverlayState extends State<HomeFeedOverlay> {
_header(context),
Expanded(
child: Align(
alignment: const Alignment(1.0, 0.80),
alignment: Alignment.bottomRight,
child: Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 10, 16),
padding: const EdgeInsets.fromLTRB(0, 0, 10, 12),
child: _rail(),
),
),
@@ -160,7 +160,7 @@ class _HomeFeedOverlayState extends State<HomeFeedOverlay> {
widget.onBoostStart();
return;
}
_openMore(context);
widget.onMore();
}
Widget _boostHint() {
@@ -209,7 +209,7 @@ class _HomeFeedOverlayState extends State<HomeFeedOverlay> {
glyphSize: _topIconGlyph,
refreshing: _refreshing,
onTap: _refresh,
onLongPress: () => _openMore(context),
onLongPress: widget.onMore,
),
Expanded(
child: Center(
@@ -506,18 +506,4 @@ class _HomeFeedOverlayState extends State<HomeFeedOverlay> {
context,
).showSnackBar(SnackBar(content: Text(widget.l10n.comingSoon)));
}
Future<void> _openMore(BuildContext context) async {
await showModalBottomSheet<void>(
context: context,
backgroundColor: AppColors.card,
showDragHandle: true,
builder: (sheetContext) => _FeedMoreSheet(
l10n: widget.l10n,
onDownload: widget.onDownload,
onPip: widget.onPip,
onClear: widget.onClear,
),
);
}
}