item_facility_book.dart 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import 'package:cs_resources/theme/app_colors_theme.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:widgets/ext/ex_widget.dart';
  4. import 'package:widgets/my_load_image.dart';
  5. import 'package:widgets/my_text_view.dart';
  6. /// 设施的Book的Item
  7. class FacilityBookItem extends StatelessWidget {
  8. final int index;
  9. final String item;
  10. const FacilityBookItem({
  11. required this.index,
  12. required this.item,
  13. });
  14. @override
  15. Widget build(BuildContext context) {
  16. return Container(
  17. width: double.infinity,
  18. height: 80,
  19. margin: const EdgeInsets.only(left: 15, right: 15, top: 5, bottom: 5),
  20. padding: const EdgeInsets.symmetric(horizontal: 20),
  21. decoration: BoxDecoration(
  22. color: context.appColors.whiteBG,
  23. borderRadius: BorderRadius.circular(6.0), // 圆角
  24. ),
  25. child: Row(
  26. mainAxisSize: MainAxisSize.max,
  27. crossAxisAlignment: CrossAxisAlignment.center,
  28. children: [
  29. MyLoadImage(
  30. "https://img0.baidu.com/it/u=2679587808,2501833998&fm=253&fmt=auto&app=120&f=JPEG?w=372&h=400",
  31. width: 38.5,
  32. ),
  33. MyTextView(
  34. "Function Room",
  35. marginLeft: 17,
  36. fontSize: 16,
  37. textColor: context.appColors.textBlack,
  38. isFontMedium: true,
  39. ).expanded(),
  40. ],
  41. ),
  42. );
  43. }
  44. }