style: 增加推荐剧单渐变背景
This commit is contained in:
1 parent
0b3f362093
commit
604ab60b63
4 files changed
+76
-8
No files matched your search
@@ -68,14 +68,7 @@ class _RecommendPageState extends State<RecommendPage> {
|
||||
),
|
||||
_KeepAliveTab(
|
||||
key: const PageStorageKey('recommend-tab-playlists'),
|
||||
child: _withTopNavSpace(
|
||||
RecommendSectionsView(
|
||||
feedController: widget.feedController,
|
||||
categories: categories,
|
||||
onOpenDrama: _openDrama,
|
||||
onMore: _handleMore,
|
||||
),
|
||||
),
|
||||
child: _recommendPlaylists(categories),
|
||||
),
|
||||
_KeepAliveTab(
|
||||
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) {
|
||||
setState(() {
|
||||
_tab = tab;
|
||||
|
||||
Reference in new issue
Block a user