newsfeed_card_footer.dart 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. import 'package:cs_resources/generated/assets.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:flutter/widgets.dart';
  4. import 'package:shared/utils/color_utils.dart';
  5. import 'package:widgets/my_load_image.dart';
  6. import 'package:widgets/my_text_view.dart';
  7. // 'id':1,
  8. // 'avator': Assets.communityCamera,
  9. // 'title': 'William Jefferson',
  10. // 'isFollow': false,
  11. // 'content': 'She said YES and our lives changed.Thank you all for coming to my propose today.We hope everyone can ……[More]',
  12. // 'imageUrls': ['https://img.alicdn.com/tfs/TB1h.o9O4MPMeJjy1XaXXcSsFXa-640-360.jpg','https://img.alicdn.com/tfs/TB1h.o9O4MPMeJjy1XaXXcSsFXa-640-360.jpg','https://img.alicdn.com/tfs/TB1h.o9O4MPMeJjy1XaXXcSsFXa-640-360.jpg'],
  13. // 'time': 'June 17,2016 at 7:23 p.m.',
  14. // 'likeno': 12
  15. class NewsFeedCardFooter extends StatelessWidget {
  16. final bool isLike;
  17. final VoidCallback? onLike;
  18. final VoidCallback? onComment;
  19. final VoidCallback? onShare;
  20. const NewsFeedCardFooter({
  21. Key? key,
  22. required this.isLike,
  23. this.onLike,
  24. this.onComment,
  25. this.onShare
  26. })
  27. : super(key: key);
  28. @override
  29. Widget build(BuildContext context) {
  30. return Container(
  31. height: 40,
  32. width: double.infinity,
  33. padding: const EdgeInsets.symmetric(horizontal: 16),
  34. // color: Colors.red,
  35. child: Expanded(
  36. child: Row(
  37. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  38. children: [
  39. Row(
  40. children: [
  41. const MyAssetImage(Assets.communityLike, width: 16,height: 16,),
  42. MyTextView(
  43. 'Like',
  44. textColor: ColorUtils.string2Color('#767676'),
  45. fontSize: 14,
  46. isFontRegular: true,
  47. textAlign: TextAlign.left,
  48. marginLeft: 8,
  49. ),
  50. ],
  51. ),
  52. Row(
  53. children: [
  54. const MyAssetImage(Assets.communityComments, width: 16,height: 16,),
  55. MyTextView(
  56. 'Comments',
  57. textColor: ColorUtils.string2Color('#767676'),
  58. fontSize: 14,
  59. isFontRegular: true,
  60. textAlign: TextAlign.left,
  61. marginLeft: 8,
  62. ),
  63. ],
  64. ),
  65. Row(
  66. children: [
  67. const MyAssetImage(Assets.communityShare, width: 16,height: 16,),
  68. MyTextView(
  69. 'Share',
  70. textColor: ColorUtils.string2Color('#767676'),
  71. fontSize: 14,
  72. isFontRegular: true,
  73. textAlign: TextAlign.left,
  74. marginLeft: 8,
  75. ),
  76. ],
  77. ),
  78. ]
  79. ),
  80. )
  81. );
  82. }
  83. }