style(theme): 客户端切换深色视觉风格
This commit is contained in:
1 parent
295c21513c
commit
4bc04fd8ae
75 files changed
+732
-330
No files matched your search
@@ -7,7 +7,7 @@ import 'package:fruitshorts/core/theme/app_theme.dart';
|
||||
import 'package:fruitshorts/core/widgets/subpage_header.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('should_render_unified_light_header_dimensions', (tester) async {
|
||||
testWidgets('should_render_unified_dark_header_dimensions', (tester) async {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
theme: AppTheme.light(),
|
||||
@@ -47,7 +47,7 @@ void main() {
|
||||
)
|
||||
.decoration
|
||||
as BoxDecoration;
|
||||
expect(shadow.boxShadow!.single.color, const Color(0x14000000));
|
||||
expect(shadow.boxShadow!.single.color, AppColors.shadowSubtle);
|
||||
expect(shadow.boxShadow!.single.blurRadius, 8);
|
||||
expect(shadow.boxShadow!.single.offset, const Offset(0, 2));
|
||||
});
|
||||
@@ -75,7 +75,7 @@ void main() {
|
||||
MaterialApp(
|
||||
theme: AppTheme.light(),
|
||||
home: const Scaffold(
|
||||
backgroundColor: Colors.black,
|
||||
backgroundColor: AppColors.mediaBlack,
|
||||
body: AppSubpageHeader(
|
||||
title: 'Title',
|
||||
backKey: Key('sample-back'),
|
||||
@@ -97,8 +97,8 @@ void main() {
|
||||
matching: find.byIcon(Icons.chevron_left_rounded),
|
||||
),
|
||||
);
|
||||
expect(material.color, const Color(0x59000000));
|
||||
expect(icon.color, Colors.white);
|
||||
expect(material.color, AppColors.headerScrim);
|
||||
expect(icon.color, AppColors.onSurface);
|
||||
expect(icon.size, 22);
|
||||
expect(icon.weight, 600);
|
||||
final shadow =
|
||||
@@ -108,7 +108,7 @@ void main() {
|
||||
)
|
||||
.decoration
|
||||
as BoxDecoration;
|
||||
expect(shadow.boxShadow!.single.color, const Color(0x33000000));
|
||||
expect(shadow.boxShadow!.single.color, AppColors.shadowSoft);
|
||||
expect(shadow.boxShadow!.single.blurRadius, 8);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user