merge: 增加推荐剧单渐变背景
This commit is contained in:
commit
86aa7e0f4f
4 files changed
+76
-8
No files matched your search
@@ -1270,3 +1270,8 @@ $ flutter test
|
|||||||
- 继续观看全部入口可切到追剧页播放历史 tab;`flutter analyze`:No issues found。
|
- 继续观看全部入口可切到追剧页播放历史 tab;`flutter analyze`:No issues found。
|
||||||
- 用户区昵称与 UID 收紧为 4 间距,昵称列相对头像垂直居中;UID 12、复制图标 14。
|
- 用户区昵称与 UID 收紧为 4 间距,昵称列相对头像垂直居中;UID 12、复制图标 14。
|
||||||
- UID 行改用 GestureDetector 并锁定 16 高,昵称与 UID 间距 2、昵称行高 1.15,避免 Material 热区撑高;`flutter analyze`:No issues found。
|
- UID 行改用 GestureDetector 并锁定 16 高,昵称与 UID 间距 2、昵称行高 1.15,避免 Material 热区撑高;`flutter analyze`:No issues found。
|
||||||
|
|
||||||
|
## 2026-10-22 推荐剧单渐变背景
|
||||||
|
|
||||||
|
- 仅为推荐页「剧单」子页增加暖黑三段渐变和品牌橙径向光晕,推荐视频与全部短剧背景不变。
|
||||||
|
- 渐变复用「我的」页色值,光晕使用 `#26FF6B2C`;分区与卡片样式保持原样;`flutter analyze`:No issues found。
|
||||||
@@ -101,6 +101,7 @@ abstract final class AppColors {
|
|||||||
static const mineIconSupport = Color(0xFFA78BFA);
|
static const mineIconSupport = Color(0xFFA78BFA);
|
||||||
static const mineIconLanguage = Color(0xFF22D3EE);
|
static const mineIconLanguage = Color(0xFF22D3EE);
|
||||||
static const mineIconSettings = Color(0xFFA1A1AA);
|
static const mineIconSettings = Color(0xFFA1A1AA);
|
||||||
|
static const recommendPlaylistGlow = Color(0x26FF6B2C);
|
||||||
|
|
||||||
/// 次级文字与列表 chevron。
|
/// 次级文字与列表 chevron。
|
||||||
static const textPrimary = Color(0xFFFFFFFF);
|
static const textPrimary = Color(0xFFFFFFFF);
|
||||||
|
|||||||
@@ -68,14 +68,7 @@ class _RecommendPageState extends State<RecommendPage> {
|
|||||||
),
|
),
|
||||||
_KeepAliveTab(
|
_KeepAliveTab(
|
||||||
key: const PageStorageKey('recommend-tab-playlists'),
|
key: const PageStorageKey('recommend-tab-playlists'),
|
||||||
child: _withTopNavSpace(
|
child: _recommendPlaylists(categories),
|
||||||
RecommendSectionsView(
|
|
||||||
feedController: widget.feedController,
|
|
||||||
categories: categories,
|
|
||||||
onOpenDrama: _openDrama,
|
|
||||||
onMore: _handleMore,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
_KeepAliveTab(
|
_KeepAliveTab(
|
||||||
key: const PageStorageKey('recommend-tab-all'),
|
key: const PageStorageKey('recommend-tab-all'),
|
||||||
@@ -173,6 +166,50 @@ class _RecommendPageState extends State<RecommendPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _recommendPlaylists(CategoryController categories) {
|
||||||
|
return DecoratedBox(
|
||||||
|
key: const Key('recommend-playlist-surface'),
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
colors: [
|
||||||
|
AppColors.mineGradientTop,
|
||||||
|
AppColors.mineGradientMiddle,
|
||||||
|
AppColors.mineGradientBottom,
|
||||||
|
],
|
||||||
|
stops: [0, 0.4, 0.75],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Stack(
|
||||||
|
fit: StackFit.expand,
|
||||||
|
children: [
|
||||||
|
const DecoratedBox(
|
||||||
|
key: Key('recommend-playlist-glow'),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: RadialGradient(
|
||||||
|
center: Alignment(0, -0.95),
|
||||||
|
radius: 0.9,
|
||||||
|
colors: [
|
||||||
|
AppColors.recommendPlaylistGlow,
|
||||||
|
AppColors.transparent,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
_withTopNavSpace(
|
||||||
|
RecommendSectionsView(
|
||||||
|
feedController: widget.feedController,
|
||||||
|
categories: categories,
|
||||||
|
onOpenDrama: _openDrama,
|
||||||
|
onMore: _handleMore,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
void _selectTab(RecommendInnerTab tab) {
|
void _selectTab(RecommendInnerTab tab) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_tab = tab;
|
_tab = tab;
|
||||||
|
|||||||
@@ -143,6 +143,31 @@ void main() {
|
|||||||
expect(find.text('New This Week'), findsOneWidget);
|
expect(find.text('New This Week'), findsOneWidget);
|
||||||
expect(find.text('Costume Drama Awards'), findsOneWidget);
|
expect(find.text('Costume Drama Awards'), findsOneWidget);
|
||||||
expect(find.byType(AppBottomNav), 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"));
|
final sectionTitle = tester.widget<Text>(find.text("This Week's Hits"));
|
||||||
expect(sectionTitle.style?.fontSize, AppDimens.recommendSectionTitle);
|
expect(sectionTitle.style?.fontSize, AppDimens.recommendSectionTitle);
|
||||||
expect(sectionTitle.style?.fontWeight, FontWeight.w700);
|
expect(sectionTitle.style?.fontWeight, FontWeight.w700);
|
||||||
|
|||||||
Reference in new issue
Block a user