style(recommend): 按截图重做全部短剧筛选区

This commit is contained in:
Zhou Weidong committed 2026-10-22 20:49:54 +08:00
1 parent 3b9ff8a306
commit d79e200650
5 files changed
+62 -63

No files matched your search

+25 -5
View File
@@ -260,7 +260,7 @@ void main() {
for (var row = 0; row < 4; row++) {
final rowRect = tester.getRect(find.byKey(Key('all-filter-row-$row')));
expect(rowRect.left, closeTo(pageRect.left + 14, 0.1));
expect(rowRect.right, closeTo(pageRect.right - 14, 0.1));
expect(rowRect.right, closeTo(pageRect.right - 12, 0.1));
}
final firstTexts = [
find.descendant(
@@ -301,7 +301,7 @@ void main() {
}
expect(
tester.getSize(find.byKey(const Key('all-filter-row-3'))).height,
AppDimens.filterChipHeight,
AppDimens.allDramasFilterButton,
);
expect(
tester.getRect(find.byKey(const Key('all-dramas-scroll'))).top -
@@ -335,6 +335,7 @@ void main() {
closeTo(fixedFilterTop, 0.1),
);
expect(find.byKey(const Key('all-filter-local')), findsOneWidget);
expect(_textStyle(tester, 'Local').color, AppColors.filterChipTextInactive);
expect(find.byKey(const Key('all-filter-subtitles')), findsOneWidget);
for (final key in [
'all-filter-reversal',
@@ -376,12 +377,17 @@ void main() {
AppDimens.filterItemGap,
);
}
expect(
tester.getTopLeft(find.byKey(const Key('all-sort-new'))).dx -
tester.getTopRight(find.byKey(const Key('all-sort-hot'))).dx,
AppDimens.filterItemGap,
);
await tester.tap(find.byKey(const Key('all-filter-local')));
await tester.pumpAndSettle();
expect(find.byKey(const Key('all-dramas-empty')), findsOneWidget);
expect(_textStyle(tester, 'Local').fontWeight, FontWeight.w600);
expect(_textStyle(tester, 'Local').fontSize, AppDimens.filterChipFont);
expect(_textStyle(tester, 'Local').color, AppColors.textPrimary);
expect(_textStyle(tester, 'Local').color, AppColors.filterChipTextSelected);
final selectedChip = tester.widget<Container>(
find
.descendant(
@@ -402,8 +408,9 @@ void main() {
await tester.pumpAndSettle();
await tester.tap(find.byKey(const Key('all-sort-new')));
await tester.pump();
expect(_textStyle(tester, 'New').fontWeight, FontWeight.w700);
expect(_textStyle(tester, 'New').fontWeight, FontWeight.w600);
expect(_textStyle(tester, 'New').fontSize, AppDimens.filterChipFont);
expect(_textStyle(tester, 'New').color, AppColors.filterChipTextSelected);
expect(
tester.getSize(find.byKey(const Key('all-sort-new'))).height,
AppDimens.filterChipHeight,
@@ -421,7 +428,7 @@ void main() {
final filterButton = find.byKey(const Key('all-dramas-filter-page'));
expect(
tester.getSize(filterButton),
const Size.square(AppDimens.allDramasFilterIcon),
const Size.square(AppDimens.allDramasFilterButton),
);
expect(
tester.getRect(filterButton).right,
@@ -430,6 +437,19 @@ void main() {
0.1,
),
);
final filterMaterial = tester.widget<Material>(
find.byKey(const Key('all-dramas-filter-page-button')),
);
expect(filterMaterial.color, AppColors.filterMenuButton);
expect(filterMaterial.shape, const CircleBorder());
final filterIcon = tester.widget<Icon>(
find.descendant(
of: filterButton,
matching: find.byIcon(Icons.filter_list_rounded),
),
);
expect(filterIcon.size, AppDimens.allDramasFilterIcon);
expect(filterIcon.color, AppColors.filterMenuIcon);
await tester.tap(find.byKey(const Key('recommend-tab-playlist')));
await tester.pumpAndSettle();