fix(home): 优化短剧列表下拉刷新体验
This commit is contained in:
1 parent
f69a27bb80
commit
7945f3ffed
8 files changed
+247
-201
No files matched your search
@@ -12,7 +12,7 @@ void main() {
|
||||
testWidgets('should_freeze_pull_offset_until_refresh_completes', (
|
||||
tester,
|
||||
) async {
|
||||
expect(AppPullToRefresh.physics.parent, isA<ClampingScrollPhysics>());
|
||||
expect(AppPullToRefresh.physics.parent, isA<BouncingScrollPhysics>());
|
||||
final refresh = Completer<void>();
|
||||
var calls = 0;
|
||||
await tester.pumpWidget(
|
||||
@@ -48,7 +48,7 @@ void main() {
|
||||
expect(_contentOffset(tester), greaterThan(0));
|
||||
expect(
|
||||
tester.widget<Text>(find.text('Pull to refresh')).style?.color,
|
||||
AppColors.blue,
|
||||
AppColors.navSelected,
|
||||
);
|
||||
|
||||
await gesture.moveBy(const Offset(0, 120));
|
||||
@@ -56,7 +56,7 @@ void main() {
|
||||
expect(find.text('Release to refresh'), findsOneWidget);
|
||||
expect(
|
||||
tester.widget<Text>(find.text('Release to refresh')).style?.color,
|
||||
AppColors.blue,
|
||||
AppColors.navSelected,
|
||||
);
|
||||
|
||||
await gesture.up();
|
||||
@@ -64,7 +64,7 @@ void main() {
|
||||
expect(find.text('Refreshing…'), findsOneWidget);
|
||||
expect(
|
||||
tester.widget<Text>(find.text('Refreshing…')).style?.color,
|
||||
AppColors.blue,
|
||||
AppColors.navSelected,
|
||||
);
|
||||
expect(calls, 1);
|
||||
final releaseOffset = _contentOffset(tester);
|
||||
|
||||
Reference in new issue
Block a user