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:domain/entity/user_me_entity.dart';
  4. import 'package:flutter/material.dart';
  5. import 'package:widgets/ext/ex_widget.dart';
  6. import 'package:widgets/my_load_image.dart';
  7. import 'package:widgets/my_text_view.dart';
  8. class HouseholdItem extends StatelessWidget {
  9. final int index;
  10. final UserMeHouseholds item;
  11. const HouseholdItem({
  12. required this.index,
  13. required this.item,
  14. });
  15. @override
  16. Widget build(BuildContext context) {
  17. return Container(
  18. width: double.infinity,
  19. color: context.appColors.whiteBG,
  20. margin: const EdgeInsets.only(bottom: 5),
  21. padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 15),
  22. child: Row(
  23. mainAxisSize: MainAxisSize.max,
  24. children: [
  25. MyLoadImage(
  26. item.avatar,
  27. width: 65,
  28. height: 65,
  29. isCircle: true,
  30. ).marginOnly(right: 17),
  31. MyTextView(
  32. item.name ?? "-",
  33. fontSize: 17,
  34. isFontBold: true,
  35. textColor: context.appColors.textBlack,
  36. maxLines: 2,
  37. ).expanded(),
  38. ],
  39. ),
  40. );
  41. }
  42. }