fix(flutter): feed 长按加速与刷新转圈

This commit is contained in:
Zhou Weidong committed 2026-10-20 14:19:14 +08:00
1 parent 564c0dbbef
commit ea9ea6e606
5 files changed
+317 -103

No files matched your search

@@ -3,9 +3,9 @@
part of 'home_feed_overlay.dart';
const double _thumbSize = 6;
const double _thumbActiveSize = 10;
const double _trackActiveHeight = 4;
const double _lineCenterFromBottom = 6;
const double _thumbActiveSize = 14;
const double _trackActiveHeight = 6;
const double _lineCenterFromBottom = 8;
/// 顶部频道 tab:漫剧点击提示即将上线。
enum _FeedTab {
@@ -69,6 +69,7 @@ class _RefreshButton extends StatelessWidget {
required this.tooltip,
required this.dimension,
required this.glyphSize,
required this.refreshing,
required this.onTap,
required this.onLongPress,
});
@@ -76,6 +77,7 @@ class _RefreshButton extends StatelessWidget {
final String tooltip;
final double dimension;
final double glyphSize;
final bool refreshing;
final VoidCallback onTap;
final VoidCallback onLongPress;
@@ -90,12 +92,23 @@ class _RefreshButton extends StatelessWidget {
onLongPress: onLongPress,
child: SizedBox.square(
dimension: dimension,
child: Icon(
Icons.refresh_rounded,
size: glyphSize,
color: Colors.white,
shadows: const [Shadow(blurRadius: 6, color: Colors.black)],
),
child: refreshing
? const Center(
child: SizedBox.square(
dimension: 18,
child: CircularProgressIndicator(
key: Key('home-feed-refreshing'),
strokeWidth: 2,
color: Colors.white,
),
),
)
: Icon(
Icons.refresh_rounded,
size: glyphSize,
color: Colors.white,
shadows: const [Shadow(blurRadius: 6, color: Colors.black)],
),
),
),
);