opt: replace SizedBox with spacing (#863)

This commit is contained in:
My-Responsitories
2025-05-21 02:16:01 +08:00
committed by GitHub
parent 218e829fd4
commit 1efd62803a
8 changed files with 35 additions and 59 deletions

View File

@@ -177,8 +177,9 @@ class VideoCardV extends StatelessWidget {
),
videoStat(context, theme),
Row(
spacing: 2,
children: [
if (videoItem.goto == 'bangumi') ...[
if (videoItem.goto == 'bangumi')
PBadge(
text: videoItem.bangumiBadge,
isStack: false,
@@ -186,18 +187,14 @@ class VideoCardV extends StatelessWidget {
type: PBadgeType.line_primary,
fontSize: 9,
),
const SizedBox(width: 2),
],
if (videoItem.rcmdReason != null) ...[
if (videoItem.rcmdReason != null)
PBadge(
text: videoItem.rcmdReason,
isStack: false,
size: PBadgeSize.small,
type: PBadgeType.secondary,
),
const SizedBox(width: 2),
],
if (videoItem.goto == 'picture') ...[
if (videoItem.goto == 'picture')
const PBadge(
text: '动态',
isStack: false,
@@ -205,17 +202,13 @@ class VideoCardV extends StatelessWidget {
type: PBadgeType.line_primary,
fontSize: 9,
),
const SizedBox(width: 2),
],
if (videoItem.isFollowed) ...[
if (videoItem.isFollowed)
const PBadge(
text: '已关注',
isStack: false,
size: PBadgeSize.small,
type: PBadgeType.secondary,
),
const SizedBox(width: 2),
],
Expanded(
flex: 1,
child: Text(