small_video_item.dart 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import 'package:eye_video/bizmodule/bizwidget/cover_image_item.dart';
  2. import 'package:flutter/material.dart';
  3. class SmallItemVideo extends StatelessWidget {
  4. final String coverUrl;
  5. final int duration;
  6. final String title;
  7. final String tag;
  8. const SmallItemVideo(
  9. {Key? key, this.title, this.tag, this.coverUrl, this.duration})
  10. : super(key: key);
  11. @override
  12. Widget build(BuildContext context) {
  13. return Container(
  14. margin: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 10),
  15. child: Wrap(
  16. spacing: 16,
  17. direction: Axis.horizontal,
  18. children: [
  19. CoverImageItem(
  20. width: MediaQuery.of(context).size.width * 0.5,
  21. coverUrl: coverUrl,
  22. duration: duration,
  23. ),
  24. Column(
  25. crossAxisAlignment: CrossAxisAlignment.start,
  26. children: [
  27. Container(
  28. child: Text(
  29. title,
  30. overflow: TextOverflow.ellipsis,
  31. style: TextStyle(
  32. fontSize: 14,
  33. color: Color(0xff333333),
  34. fontFamily: 'NotoSansHans-Medium',
  35. ),
  36. ),
  37. width: MediaQuery.of(context).size.width * 0.5 - 38,
  38. margin: EdgeInsets.only(top: 10, bottom: 30),
  39. ),
  40. Container(
  41. width: MediaQuery.of(context).size.width * 0.5 - 38,
  42. child: Text(
  43. tag,
  44. overflow: TextOverflow.ellipsis,
  45. style: TextStyle(
  46. fontSize: 12,
  47. color: Color(0xff666666),
  48. ),
  49. ),
  50. ),
  51. ],
  52. ),
  53. ],
  54. ),
  55. );
  56. }
  57. }