style(theme): 客户端切换深色视觉风格
This commit is contained in:
1 parent
295c21513c
commit
4bc04fd8ae
75 files changed
+732
-330
No files matched your search
@@ -144,6 +144,6 @@ void main() {
|
||||
matching: find.byType(ColoredBox),
|
||||
),
|
||||
);
|
||||
expect(coloredBox.color, Colors.black);
|
||||
expect(coloredBox.color, AppColors.bar);
|
||||
});
|
||||
}
|
||||
@@ -52,9 +52,9 @@ void main() {
|
||||
final bar = tester.widget<Container>(barFinder);
|
||||
final decoration = bar.decoration as BoxDecoration;
|
||||
final border = decoration.border as Border;
|
||||
// 首页 feed 用深色导航。
|
||||
expect(decoration.color, Colors.black);
|
||||
expect(border.top.color, Colors.white12);
|
||||
// 所有页面统一深色导航。
|
||||
expect(decoration.color, AppColors.bar);
|
||||
expect(border.top.color, AppColors.border);
|
||||
expect(
|
||||
tester
|
||||
.widget<Text>(
|
||||
@@ -65,7 +65,7 @@ void main() {
|
||||
)
|
||||
.style
|
||||
?.color,
|
||||
Colors.white70,
|
||||
AppColors.navUnselected,
|
||||
);
|
||||
expect(
|
||||
tester
|
||||
@@ -100,10 +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);
|
||||
final theaterBar = tester.widget<Container>(barFinder);
|
||||
final theaterDecoration = theaterBar.decoration as BoxDecoration;
|
||||
expect(theaterDecoration.color, AppColors.bar.withValues(alpha: 0.96));
|
||||
expect((theaterDecoration.border as Border).top.color, AppColors.border);
|
||||
await tester.tap(find.byKey(const Key('tab-theater')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(haptics.selectionClicks, 1);
|
||||
|
||||
@@ -328,7 +328,7 @@ void main() {
|
||||
expect(find.byKey(const Key('home-feed-pip')), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('should_restore_light_theme_after_leaving_feed_tab', (
|
||||
testWidgets('should_keep_light_status_bar_after_leaving_feed_tab', (
|
||||
tester,
|
||||
) async {
|
||||
await _pumpApp(tester);
|
||||
@@ -338,7 +338,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.byKey(const Key('home-page-gradient')), findsOneWidget);
|
||||
expect(_hasLightStatusBar(tester), isFalse);
|
||||
expect(_hasLightStatusBar(tester), isTrue);
|
||||
});
|
||||
|
||||
testWidgets('should_switch_feed_drama_when_swiped_up', (tester) async {
|
||||
|
||||
Reference in new issue
Block a user