// Author: fengshengxiong // Date: 2024/6/21 // Description: 专辑Item import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:tone_snap/components/network_image_widget.dart'; import 'package:tone_snap/data/models/home_model.dart'; import 'package:tone_snap/utils/obj_util.dart'; class OmvItem extends StatelessWidget { const OmvItem({super.key, required this.content}); final Content content; @override Widget build(BuildContext context) { return GestureDetector( onTap: () {}, child: SizedBox( width: 339.w, height: double.infinity, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ NetworkImageWidget( url: content.thumbnail, width: 339.w, height: 187.w, radius: 16.r, ), const Spacer(), Text( ObjUtil.getStr(content.title), maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( color: Colors.white, fontSize: 14.sp, ), ), SizedBox(height: 2.h), Text( ObjUtil.getStr(content.subTitle), maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( color: const Color(0xFF666666), fontSize: 12.sp, ), ), ], ), ), ); } }