fix(home): 调整封面播放量位置
This commit is contained in:
1 parent
e11f55777e
commit
972e542e5c
10 files changed
+179
-147
No files matched your search
@@ -159,6 +159,8 @@ abstract final class AppColors {
|
||||
|
||||
/// 播放器控件胶囊与圆形底色。
|
||||
static const playerOverlayPill = Color(0xB3000000);
|
||||
static const cardBottomScrimStart = Color(0x00000000);
|
||||
static const cardBottomScrimEnd = Color(0x40000000);
|
||||
|
||||
/// 进度条未激活轨道。
|
||||
static const inactiveTrack = Color(0x24FFFFFF);
|
||||
|
||||
@@ -89,6 +89,8 @@ abstract final class AppDimens {
|
||||
static const double cardViewsIcon = 11;
|
||||
static const double cardPlayCountFont = 12;
|
||||
static const double cardPlayCountGap = 2;
|
||||
static const double cardPlayCountBottom = 6;
|
||||
static const double cardPlayCountScrimHeight = 32;
|
||||
static const double cardGenreRibbonHeight = 20;
|
||||
static const double cardGenreRibbonRadius = 10;
|
||||
static const double cardGenreRibbonLeftInset = 8;
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
// Author: fruit.com.cn
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../formatting/count_format.dart';
|
||||
import '../theme/app_colors.dart';
|
||||
import '../theme/app_dimens.dart';
|
||||
|
||||
class CoverPlayCount extends StatelessWidget {
|
||||
const CoverPlayCount({super.key, required this.count});
|
||||
|
||||
final int count;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.auto_awesome_rounded,
|
||||
color: AppColors.textPrimary,
|
||||
size: AppDimens.cardViewsIcon,
|
||||
),
|
||||
const SizedBox(width: AppDimens.cardPlayCountGap),
|
||||
Text(
|
||||
formatPlayCount(count),
|
||||
style: const TextStyle(
|
||||
color: AppColors.textPrimary,
|
||||
fontSize: AppDimens.cardPlayCountFont,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CoverBottomScrim extends StatelessWidget {
|
||||
const CoverBottomScrim({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const SizedBox(
|
||||
height: AppDimens.cardPlayCountScrimHeight,
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
AppColors.cardBottomScrimStart,
|
||||
AppColors.cardBottomScrimEnd,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user