mod: 直播样式&组件

This commit is contained in:
guozhigq
2023-06-23 15:45:10 +08:00
parent fccd21e8b6
commit 4b1ddae3d7
8 changed files with 340 additions and 38 deletions

View File

@ -139,15 +139,36 @@ class VideoContent extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
videoItem.title,
textAlign: TextAlign.start,
style: TextStyle(
fontSize: Theme.of(context).textTheme.titleSmall!.fontSize,
fontWeight: FontWeight.w500),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
if (videoItem.title is String) ...[
Text(
videoItem.title,
textAlign: TextAlign.start,
style: TextStyle(
fontSize: Theme.of(context).textTheme.titleSmall!.fontSize,
fontWeight: FontWeight.w500),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
] else ...[
RichText(
text: TextSpan(
children: [
for (var i in videoItem.title) ...[
TextSpan(
text: i['text'],
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.w500,
color: i['type'] == 'em'
? Theme.of(context).colorScheme.primary
: Theme.of(context).colorScheme.onSurface,
),
),
]
],
),
),
],
const Spacer(),
if (videoItem.rcmdReason != null &&
videoItem.rcmdReason.content != '')