fix(ui): 打磨推荐追剧我的设置页间距与图标
This commit is contained in:
1 parent
de7da64886
commit
5346be40a9
33 files changed
+1408
-811
No files matched your search
@@ -25,6 +25,8 @@ class FollowingGridCard extends StatelessWidget {
|
||||
this.editing = false,
|
||||
this.selected,
|
||||
this.onRemove,
|
||||
this.updateBadge,
|
||||
this.subtitleColor,
|
||||
});
|
||||
|
||||
final String dramaId;
|
||||
@@ -38,6 +40,13 @@ class FollowingGridCard extends StatelessWidget {
|
||||
final bool? selected;
|
||||
final VoidCallback? onRemove;
|
||||
|
||||
/// 左上角「有更新」角标文案;null 不显示。
|
||||
/// 待后端在 Drama 增加更新状态字段后由收藏网格传入。
|
||||
final String? updateBadge;
|
||||
|
||||
/// 副标题颜色;更新中用强调红,完结用默认灰。
|
||||
final Color? subtitleColor;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
@@ -109,6 +118,32 @@ class FollowingGridCard extends StatelessWidget {
|
||||
count: viewCount,
|
||||
),
|
||||
),
|
||||
if (updateBadge != null && selected == null)
|
||||
Positioned(
|
||||
left: AppDimens.followingBadgeInset,
|
||||
top: AppDimens.followingBadgeInset,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: AppDimens.followingBadgePaddingH,
|
||||
vertical: AppDimens.followingBadgePaddingV,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.brandRed,
|
||||
borderRadius: BorderRadius.circular(
|
||||
AppDimens.followingBadgeRadius,
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
updateBadge!,
|
||||
style: const TextStyle(
|
||||
color: AppColors.onPrimary,
|
||||
fontSize: AppDimens.followingBadgeFont,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (progress != null)
|
||||
Positioned(
|
||||
left: 0,
|
||||
@@ -120,7 +155,7 @@ class FollowingGridCard extends StatelessWidget {
|
||||
minHeight: AppDimens.followingProgressHeight,
|
||||
backgroundColor: AppColors.inactiveTrack,
|
||||
valueColor: const AlwaysStoppedAnimation<Color>(
|
||||
AppColors.primary,
|
||||
AppColors.brandRed,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -130,13 +165,13 @@ class FollowingGridCard extends StatelessWidget {
|
||||
const SizedBox(height: AppDimens.cardCoverTitleGap),
|
||||
Text(
|
||||
title,
|
||||
maxLines: 2,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.left,
|
||||
style: const TextStyle(
|
||||
color: AppColors.textPrimary,
|
||||
fontSize: AppDimens.cardTitleFont,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: AppDimens.followingCardTitleFontNew,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: AppDimens.cardTitleLineHeight,
|
||||
),
|
||||
),
|
||||
@@ -146,9 +181,9 @@ class FollowingGridCard extends StatelessWidget {
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.left,
|
||||
style: const TextStyle(
|
||||
color: AppColors.textTertiary,
|
||||
fontSize: AppDimens.followingSubtitleFont,
|
||||
style: TextStyle(
|
||||
color: subtitleColor ?? AppColors.textTertiary,
|
||||
fontSize: AppDimens.followingCardSubtitleFontNew,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -169,9 +204,9 @@ class _SelectMark extends StatelessWidget {
|
||||
height: _selectMarkSize,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: selected ? AppColors.blue : AppColors.transparent,
|
||||
color: selected ? AppColors.brandRed : AppColors.transparent,
|
||||
border: Border.all(
|
||||
color: selected ? AppColors.blue : AppColors.textPrimary,
|
||||
color: selected ? AppColors.brandRed : AppColors.textPrimary,
|
||||
width: _selectBorderWidth,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user