feat(theme): 接入 Obsidian Flare 设计系统

This commit is contained in:
Zhou Weidong committed 2026-10-19 15:01:41 +08:00
1 parent b1c69e22af
commit eae1c533ce
17 files changed
+411 -49

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
// Author: fruit.com.cn
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:fruitshorts/core/theme/app_colors.dart';
import 'package:fruitshorts/core/widgets/glass_panel.dart';
void main() {
testWidgets('should_blur_and_paint_a_bordered_glass_surface', (tester) async {
await tester.pumpWidget(
const MaterialApp(
home: Scaffold(
body: Center(
child: GlassPanel(
radius: 26,
padding: EdgeInsets.all(16),
child: Text('glass'),
),
),
),
),
);
final filter = tester.widget<BackdropFilter>(find.byType(BackdropFilter));
expect(filter.filter, isNotNull);
expect(find.text('glass'), findsOneWidget);
final clip = tester.widget<ClipRRect>(find.byType(ClipRRect).first);
expect(clip.borderRadius, BorderRadius.circular(26));
final decorated = tester.widget<DecoratedBox>(
find
.descendant(
of: find.byType(GlassPanel),
matching: find.byType(DecoratedBox),
)
.first,
);
final decoration = decorated.decoration as BoxDecoration;
expect(decoration.gradient, isA<LinearGradient>());
expect(decoration.border!.top.color, AppColors.glassBorder);
});
}