style: 增加推荐剧单渐变背景

This commit is contained in:
Zhou Weidong committed 2026-10-22 21:52:13 +08:00
1 parent 0b3f362093
commit 604ab60b63
4 files changed
+76 -8

No files matched your search

@@ -143,6 +143,31 @@ void main() {
expect(find.text('New This Week'), findsOneWidget);
expect(find.text('Costume Drama Awards'), findsOneWidget);
expect(find.byType(AppBottomNav), findsOneWidget);
final playlistSurface = tester.widget<DecoratedBox>(
find.byKey(const Key('recommend-playlist-surface')),
);
final playlistGradient =
(playlistSurface.decoration as BoxDecoration).gradient!
as LinearGradient;
expect(playlistGradient.begin, Alignment.topCenter);
expect(playlistGradient.end, Alignment.bottomCenter);
expect(playlistGradient.colors, const [
AppColors.mineGradientTop,
AppColors.mineGradientMiddle,
AppColors.mineGradientBottom,
]);
expect(playlistGradient.stops, const [0, 0.4, 0.75]);
final playlistGlow = tester.widget<DecoratedBox>(
find.byKey(const Key('recommend-playlist-glow')),
);
final glowGradient =
(playlistGlow.decoration as BoxDecoration).gradient! as RadialGradient;
expect(glowGradient.center, const Alignment(0, -0.95));
expect(glowGradient.radius, 0.9);
expect(glowGradient.colors, const [
AppColors.recommendPlaylistGlow,
AppColors.transparent,
]);
final sectionTitle = tester.widget<Text>(find.text("This Week's Hits"));
expect(sectionTitle.style?.fontSize, AppDimens.recommendSectionTitle);
expect(sectionTitle.style?.fontWeight, FontWeight.w700);