item_household.dart 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import 'package:cs_resources/generated/l10n.dart';
  2. import 'package:cs_resources/theme/app_colors_theme.dart';
  3. import 'package:flutter/material.dart';
  4. import 'package:widgets/ext/ex_widget.dart';
  5. import 'package:widgets/my_load_image.dart';
  6. import 'package:widgets/my_text_view.dart';
  7. class HouseholdItem extends StatelessWidget {
  8. final int index;
  9. final String item;
  10. const HouseholdItem({
  11. required this.index,
  12. required this.item,
  13. });
  14. @override
  15. Widget build(BuildContext context) {
  16. return Container(
  17. width: double.infinity,
  18. color: context.appColors.whiteBG,
  19. margin: const EdgeInsets.only(bottom: 5),
  20. padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 15),
  21. child: Row(
  22. mainAxisSize: MainAxisSize.max,
  23. children: [
  24. MyLoadImage(
  25. "https://img1.baidu.com/it/u=1656098746,3560654086&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=800",
  26. width: 65,
  27. height: 65,
  28. isCircle: true,
  29. ).marginOnly(right: 17),
  30. MyTextView(
  31. "Wu Bing Bing",
  32. fontSize: 17,
  33. isFontBold: true,
  34. textColor: context.appColors.textBlack,
  35. maxLines: 2,
  36. ).expanded(),
  37. ],
  38. ),
  39. );
  40. }
  41. }