item_facility_deposit.dart 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import 'package:cs_resources/generated/l10n.dart';
  2. import 'package:cs_resources/theme/app_colors_theme.dart';
  3. import 'package:domain/entity/facility_page_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. /// 设施的Deposit的Item
  9. class FacilityDepositItem extends StatelessWidget {
  10. final int index;
  11. final FacilityDetail item;
  12. const FacilityDepositItem({
  13. required this.index,
  14. required this.item,
  15. });
  16. @override
  17. Widget build(BuildContext context) {
  18. return Container(
  19. width: double.infinity,
  20. color: context.appColors.whiteBG,
  21. margin: const EdgeInsets.only(top: 5),
  22. padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 23),
  23. child: Column(
  24. crossAxisAlignment: CrossAxisAlignment.start,
  25. children: [
  26. MyTextView(
  27. "${item.facility?.type?.name ?? ""} ${item.facility?.name ?? ""}",
  28. fontSize: 16,
  29. textColor: context.appColors.textPrimary,
  30. isFontMedium: true,
  31. ),
  32. Row(
  33. children: [
  34. MyTextView(
  35. S.current.deposit_hold,
  36. fontSize: 14.5,
  37. textColor: context.appColors.textBlack,
  38. isFontMedium: true,
  39. ),
  40. const Spacer(),
  41. MyTextView(
  42. "\$${item.booking?.depositPaid??""}",
  43. fontSize: 14.5,
  44. textColor: context.appColors.textBlack,
  45. isFontMedium: true,
  46. ),
  47. ],
  48. ).marginOnly(top: 10),
  49. ],
  50. ).expanded(),
  51. );
  52. }
  53. }