fix(recommend): 收窄拖动清屏范围并提升灵敏度

This commit is contained in:
Zhou Weidong committed 2026-10-22 20:19:21 +08:00
1 parent f5721592f7
commit 04f1f5a73f
4 files changed
+18 -4

No files matched your search

+13 -1
View File
@@ -3,6 +3,7 @@
import 'dart:async';
import 'dart:typed_data';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:shared_preferences_platform_interface/in_memory_shared_preferences_async.dart';
@@ -664,6 +665,11 @@ void main() {
);
expect(bar.left, closeTo(overlayRect.left + 14, 0.1));
expect(bar.width, closeTo(overlayRect.width * 0.7, 1));
expect(
tester.getCenter(find.byKey(const Key('home-feed-progress-track'))).dy -
bar.bottom,
greaterThanOrEqualTo(20),
);
final buttonBackground =
tester
.widget<DecoratedBox>(
@@ -685,7 +691,13 @@ void main() {
);
expect(
tester.getSize(find.byKey(const Key('home-feed-progress'))).height,
greaterThanOrEqualTo(28),
greaterThanOrEqualTo(32),
);
expect(
tester
.widget<GestureDetector>(find.byKey(const Key('home-feed-progress')))
.dragStartBehavior,
DragStartBehavior.down,
);
final idleTrackCenter = tester
.getRect(find.byKey(const Key('home-feed-progress-track')))