fix(flutter): 去除关注 tab 并加深色首页导航

This commit is contained in:
Zhou Weidong committed 2026-10-20 13:48:42 +08:00
1 parent ee6f0d7e72
commit d36d62f6a6
12 files changed
+48 -39

No files matched your search

+19 -3
View File
@@ -52,9 +52,21 @@ void main() {
final bar = tester.widget<Container>(barFinder);
final decoration = bar.decoration as BoxDecoration;
final border = decoration.border as Border;
expect(decoration.color, AppColors.bar.withValues(alpha: 0.95));
expect(border.top.color, AppColors.border);
expect(border.top.color, isNot(Colors.white));
// 首页 feed 用深色导航。
expect(decoration.color, const Color(0xE6000000));
expect(border.top.color, Colors.white12);
expect(
tester
.widget<Text>(
find.descendant(
of: find.byKey(const Key('tab-theater')),
matching: find.text('Theater'),
),
)
.style
?.color,
Colors.white70,
);
expect(
tester
.widget<AnimatedScale>(
@@ -88,6 +100,10 @@ void main() {
await tester.tap(find.byKey(const Key('tab-theater')));
await tester.pumpAndSettle();
expect(haptics.selectionClicks, 1);
final lightBar = tester.widget<Container>(barFinder);
final lightDecoration = lightBar.decoration as BoxDecoration;
expect(lightDecoration.color, AppColors.bar.withValues(alpha: 0.95));
expect((lightDecoration.border as Border).top.color, AppColors.border);
await tester.tap(find.byKey(const Key('tab-theater')));
await tester.pumpAndSettle();
expect(haptics.selectionClicks, 1);
+2 -2
View File
@@ -77,7 +77,7 @@ void main() {
expect(find.byKey(const Key('player-episodes-sheet')), findsOneWidget);
});
testWidgets('should_show_coming_soon_for_danmaku_and_following_tab', (
testWidgets('should_show_coming_soon_for_danmaku_and_anime_tab', (
tester,
) async {
await _pumpApp(tester);
@@ -86,7 +86,7 @@ void main() {
await tester.pump();
expect(find.text('Coming soon'), findsOneWidget);
await tester.tap(find.byKey(const Key('home-feed-tab-follow')));
await tester.tap(find.byKey(const Key('home-feed-tab-anime')));
await tester.pump();
expect(find.text('Coming soon'), findsOneWidget);
});