garage_card_footer.dart 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. import 'package:cpt_community/components/newfeed_card_header.dart';
  2. import 'package:cs_resources/generated/assets.dart';
  3. import 'package:flutter/material.dart';
  4. import 'package:flutter/widgets.dart';
  5. import 'package:shared/utils/color_utils.dart';
  6. import 'package:shared/utils/log_utils.dart';
  7. import 'package:widgets/ext/ex_widget.dart';
  8. import 'package:widgets/my_load_image.dart';
  9. import 'package:widgets/my_text_view.dart';
  10. // 'id':1,
  11. // 'avator': Assets.communityCamera,
  12. // 'title': 'William Jefferson',
  13. // 'isFollow': false,
  14. // 'content': 'She said YES and our lives changed.Thank you all for coming to my propose today.We hope everyone can ……[More]',
  15. // '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'],
  16. // 'time': 'June 17,2016 at 7:23 p.m.',
  17. // 'likeno': 12
  18. class GarageCardFooter extends StatelessWidget {
  19. final bool isLike;
  20. final VoidCallback? onLike;
  21. final VoidCallback? onComment;
  22. final VoidCallback? onShare;
  23. const GarageCardFooter({
  24. Key? key,
  25. required this.isLike,
  26. this.onLike,
  27. this.onComment,
  28. this.onShare
  29. })
  30. : super(key: key);
  31. @override
  32. Widget build(BuildContext context) {
  33. return Container(
  34. height: 40,
  35. width: double.infinity,
  36. padding: const EdgeInsets.symmetric(horizontal: 16),
  37. // color: Colors.red,
  38. child: Expanded(
  39. child: Row(
  40. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  41. children: [
  42. Container(
  43. height: 40,
  44. padding: const EdgeInsets.all(8),
  45. child: Row(
  46. children: [
  47. const MyAssetImage(Assets.communityLike, width: 16,height: 16,),
  48. MyTextView(
  49. 'Like',
  50. textColor: ColorUtils.string2Color('#767676'),
  51. fontSize: 14,
  52. isFontRegular: true,
  53. textAlign: TextAlign.left,
  54. marginLeft: 8,
  55. ),
  56. ],
  57. ),
  58. ).onTap((){
  59. Log.d("点击了like");
  60. onLike?.call();
  61. }),
  62. Container(
  63. height: 40,
  64. padding: const EdgeInsets.all(8),
  65. child: Row(
  66. children: [
  67. const MyAssetImage(Assets.communityComments, width: 16,height: 16,),
  68. MyTextView(
  69. 'Comments',
  70. textColor: ColorUtils.string2Color('#767676'),
  71. fontSize: 14,
  72. isFontRegular: true,
  73. textAlign: TextAlign.left,
  74. marginLeft: 8,
  75. ),
  76. ],
  77. ),
  78. ).onTap((){
  79. Log.d("点击了comments");
  80. onComment?.call();
  81. }),
  82. Container(
  83. height: 40,
  84. padding: const EdgeInsets.all(8),
  85. child: Row(
  86. children: [
  87. const MyAssetImage(Assets.communityShare, width: 16,height: 16,),
  88. MyTextView(
  89. 'Share',
  90. textColor: ColorUtils.string2Color('#767676'),
  91. fontSize: 14,
  92. isFontRegular: true,
  93. textAlign: TextAlign.left,
  94. marginLeft: 8,
  95. ),
  96. ],
  97. ),
  98. ).onTap((){
  99. Log.d("点击了share");
  100. onShare?.call();
  101. }),
  102. ]
  103. ),
  104. )
  105. );
  106. }
  107. }