merge: model_hot_video_item
This commit is contained in:
@ -32,7 +32,7 @@ class VideoCardH extends StatelessWidget {
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
await Future.delayed(const Duration(milliseconds: 200));
|
||||
int aid = videoItem['id'] ?? videoItem['aid'];
|
||||
int aid = videoItem.aid ?? videoItem.id;
|
||||
Get.toNamed('/video?aid=$aid',
|
||||
arguments: {'videoItem': videoItem});
|
||||
},
|
||||
@ -62,7 +62,7 @@ class VideoCardH extends StatelessWidget {
|
||||
NetworkImgLayer(
|
||||
// src: videoItem['pic'] +
|
||||
// '@${(maxWidth * 2).toInt()}w',
|
||||
src: videoItem['pic'] + '@.webp',
|
||||
src: videoItem.pic + '@.webp',
|
||||
width: maxWidth,
|
||||
height: maxHeight,
|
||||
),
|
||||
@ -77,11 +77,12 @@ class VideoCardH extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
color: Colors.black54.withOpacity(0.4)),
|
||||
child: Text(
|
||||
Utils.timeFormat(videoItem['duration']!),
|
||||
Utils.timeFormat(videoItem.duration!),
|
||||
style: const TextStyle(
|
||||
fontSize: 11, color: Colors.white),
|
||||
),
|
||||
),
|
||||
// Image.network( videoItem['pic'], width: double.infinity, height: double.infinity,),
|
||||
)
|
||||
],
|
||||
);
|
||||
@ -116,7 +117,7 @@ class VideoContent extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
videoItem['title'],
|
||||
videoItem.title,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontSize: Theme.of(context).textTheme.titleSmall!.fontSize,
|
||||
@ -125,8 +126,8 @@ class VideoContent extends StatelessWidget {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
const Spacer(),
|
||||
if (videoItem['rcmd_reason'] != '' &&
|
||||
videoItem['rcmd_reason']['content'] != '')
|
||||
if (videoItem.rcmdReason != '' &&
|
||||
videoItem.rcmdReason.content != '')
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 2, horizontal: 5),
|
||||
decoration: BoxDecoration(
|
||||
@ -135,7 +136,7 @@ class VideoContent extends StatelessWidget {
|
||||
color: Theme.of(context).colorScheme.surfaceTint),
|
||||
),
|
||||
child: Text(
|
||||
videoItem['rcmd_reason']['content'],
|
||||
videoItem.rcmdReason.content,
|
||||
style: TextStyle(
|
||||
fontSize: 9,
|
||||
color: Theme.of(context).colorScheme.surfaceTint),
|
||||
@ -151,7 +152,7 @@ class VideoContent extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 2),
|
||||
Text(
|
||||
videoItem['owner']['name'],
|
||||
videoItem.owner.name,
|
||||
style: TextStyle(
|
||||
fontSize: Theme.of(context).textTheme.labelSmall!.fontSize,
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
@ -163,11 +164,11 @@ class VideoContent extends StatelessWidget {
|
||||
children: [
|
||||
StatView(
|
||||
theme: 'gray',
|
||||
view: videoItem['stat']['view'],
|
||||
view: videoItem.stat.view,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
Utils.dateFormat(videoItem['pubdate']!),
|
||||
Utils.dateFormat(videoItem.pubdate!),
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
color: Theme.of(context).colorScheme.outline),
|
||||
|
Reference in New Issue
Block a user