opt later item

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-08-06 18:26:18 +08:00
parent 40a19f2766
commit 554e96c820

View File

@@ -176,83 +176,89 @@ class VideoCardHLater extends StatelessWidget {
Widget content(BuildContext context, ThemeData theme) { Widget content(BuildContext context, ThemeData theme) {
final isPgc = videoItem.isPgc == true && videoItem.bangumi != null; final isPgc = videoItem.isPgc == true && videoItem.bangumi != null;
Widget bottom = Row( Widget stat = StatWidget(
spacing: 8, type: StatType.play,
children: [ value: videoItem.stat?.view,
StatWidget(
type: StatType.play,
value: videoItem.stat?.view,
),
if (!isPgc)
StatWidget(
type: StatType.danmaku,
value: videoItem.stat?.danmaku,
),
const Spacer(),
iconButton(
tooltip: '移除',
context: context,
onPressed: () => ctr..toViewDel(context, index, videoItem.aid),
icon: Icons.clear,
iconColor: theme.colorScheme.outline,
bgColor: Colors.transparent,
),
],
); );
return Expanded( return Expanded(
child: Column( child: Stack(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (isPgc) ...[ Column(
Text( crossAxisAlignment: CrossAxisAlignment.start,
videoItem.bangumi!.season!.title!, children: isPgc
style: TextStyle( ? [
fontSize: theme.textTheme.bodyMedium!.fontSize, Text(
height: 1.42, videoItem.bangumi!.season!.title!,
letterSpacing: 0.3, style: TextStyle(
), fontSize: theme.textTheme.bodyMedium!.fontSize,
maxLines: 2, height: 1.42,
overflow: TextOverflow.ellipsis, letterSpacing: 0.3,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
const SizedBox(height: 3),
Text(
videoItem.subtitle!,
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 13,
color: theme.colorScheme.outline,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
const Spacer(),
stat,
]
: [
Expanded(
child: Text(
videoItem.title!,
style: TextStyle(
fontSize: theme.textTheme.bodyMedium!.fontSize,
height: 1.42,
letterSpacing: 0.3,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
),
Text(
videoItem.owner!.name!,
maxLines: 1,
style: TextStyle(
fontSize: 12,
height: 1,
color: theme.colorScheme.outline,
overflow: TextOverflow.clip,
),
),
const SizedBox(height: 3),
Row(
spacing: 8,
children: [
stat,
StatWidget(
type: StatType.danmaku,
value: videoItem.stat?.danmaku,
),
],
),
],
),
Positioned(
right: 0,
bottom: 0,
child: iconButton(
tooltip: '移除',
context: context,
onPressed: () => ctr.toViewDel(context, index, videoItem.aid),
icon: Icons.clear,
iconColor: theme.colorScheme.outline,
bgColor: Colors.transparent,
), ),
const SizedBox(height: 3), ),
Text(
videoItem.subtitle!,
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 13,
color: theme.colorScheme.outline,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
const Spacer(),
bottom,
] else ...[
Expanded(
child: Text(
videoItem.title!,
style: TextStyle(
fontSize: theme.textTheme.bodyMedium!.fontSize,
height: 1.42,
letterSpacing: 0.3,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
),
Text(
videoItem.owner!.name!,
maxLines: 1,
style: TextStyle(
fontSize: 12,
height: 1,
color: theme.colorScheme.outline,
overflow: TextOverflow.clip,
),
),
const SizedBox(height: 3),
bottom,
],
], ],
), ),
); );