From 9cc492782e473bbb25bc05548fc465447542a4bb Mon Sep 17 00:00:00 2001 From: DelLevin-Home Date: Sun, 9 Aug 2026 22:14:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B7=B2=E9=98=85=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/explore/reviewed_page.dart | 44 ++++++++++++++++------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/lib/pages/explore/reviewed_page.dart b/lib/pages/explore/reviewed_page.dart index aee3ccf..a675582 100644 --- a/lib/pages/explore/reviewed_page.dart +++ b/lib/pages/explore/reviewed_page.dart @@ -228,7 +228,7 @@ class _ReviewedPageState extends State { : '--'; return Container( - margin: const EdgeInsets.fromLTRB(16, 8, 16, 0), + margin: const EdgeInsets.fromLTRB(20, 8, 20, 0), padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14), decoration: BoxDecoration( color: colors.surfaceContainerLow, @@ -237,19 +237,26 @@ class _ReviewedPageState extends State { child: Column( children: [ // 第一行:总数 + 评分 - Row( - children: [ - _buildStatItem('${filtered.length}', '已阅', colors.primary, Icons.done_all_rounded, colors), - _buildStatDivider(colors), - _buildStatItem(avg, '均分', Colors.amber, Icons.star_rounded, colors), - _buildStatDivider(colors), - // 分类计数 - _buildMiniCategory('影视', movieCount, Colors.blue, _ItemType.movie, colors), - const SizedBox(width: 12), - _buildMiniCategory('书籍', bookCount, Colors.teal, _ItemType.book, colors), - const SizedBox(width: 12), - _buildMiniCategory('游戏', gameCount, Colors.orange, _ItemType.game, colors), - ], + _FadeEdgeScrollView( + colors: colors, + fadeColor: colors.surfaceContainerLow, + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: [ + _buildStatItem('${filtered.length}', '已阅', colors.primary, Icons.done_all_rounded, colors), + _buildStatDivider(colors), + _buildStatItem(avg, '均分', Colors.amber, Icons.star_rounded, colors), + _buildStatDivider(colors), + // 分类计数 + _buildMiniCategory('影视', movieCount, Colors.blue, _ItemType.movie, colors), + const SizedBox(width: 12), + _buildMiniCategory('书籍', bookCount, Colors.teal, _ItemType.book, colors), + const SizedBox(width: 12), + _buildMiniCategory('游戏', gameCount, Colors.orange, _ItemType.game, colors), + ], + ), + ), ), ], ), @@ -658,11 +665,12 @@ class _ReviewedPageState extends State { class _FadeEdgeScrollView extends StatelessWidget { final ColorScheme colors; final Widget child; - const _FadeEdgeScrollView({required this.colors, required this.child}); + final Color? fadeColor; + const _FadeEdgeScrollView({required this.colors, required this.child, this.fadeColor}); @override Widget build(BuildContext context) { - final fadeColor = colors.surface; + final fade = fadeColor ?? colors.surface; return Stack( children: [ child, @@ -675,7 +683,7 @@ class _FadeEdgeScrollView extends StatelessWidget { gradient: LinearGradient( begin: Alignment.centerLeft, end: Alignment.centerRight, - colors: [fadeColor, fadeColor.withValues(alpha: 0)], + colors: [fade, fade.withValues(alpha: 0)], ), ), ), @@ -690,7 +698,7 @@ class _FadeEdgeScrollView extends StatelessWidget { gradient: LinearGradient( begin: Alignment.centerRight, end: Alignment.centerLeft, - colors: [fadeColor, fadeColor.withValues(alpha: 0)], + colors: [fade, fade.withValues(alpha: 0)], ), ), ),