123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. import 'dart:ui' as ui;
  2. import 'package:flutter/material.dart';
  3. import 'package:flutter_screenutil/flutter_screenutil.dart';
  4. import 'package:farmer_client/widgets/LinearGradientText.dart';
  5. Widget summary() {
  6. return Column(
  7. children: [
  8. _title(),
  9. SizedBox(height: 20.w,),
  10. _desc(),
  11. SizedBox(height: 20.w,),
  12. _detail(),
  13. SizedBox(height: 20.w,),
  14. ],
  15. );
  16. }
  17. Widget _title() {
  18. return Row(
  19. children: [
  20. Expanded(
  21. child: Text("收割机001--S001",
  22. style: TextStyle(
  23. color: Color(0xFF222222),
  24. fontSize: 18.sp,
  25. fontWeight: FontWeight.bold,
  26. )),
  27. flex: 1),
  28. Container(
  29. width: 100.w,
  30. alignment: Alignment.centerRight,
  31. child: LinearGradientText(
  32. colors: const <Color>[
  33. Color(0xFFFA7878),
  34. Color(0xFFB61515),
  35. ],
  36. child: RichText(
  37. text: TextSpan(
  38. children: <InlineSpan>[
  39. TextSpan(
  40. text: "450",
  41. style: TextStyle(
  42. fontSize: 22.sp,
  43. fontWeight: FontWeight.bold,
  44. )),
  45. TextSpan(
  46. text: "元/",
  47. style: TextStyle(
  48. fontSize: 22.sp,
  49. fontWeight: FontWeight.bold,
  50. )),
  51. TextSpan(
  52. text: "公顷",
  53. style: TextStyle(
  54. fontSize: 12.sp,
  55. fontWeight: FontWeight.bold,
  56. )),
  57. ]
  58. ),
  59. ),
  60. ),
  61. )
  62. ],
  63. );
  64. }
  65. Widget _desc() {
  66. return Row(
  67. children: [
  68. Icon(Icons.location_on_outlined, size: 16.sp,),
  69. Expanded(
  70. flex: 1,
  71. child: Text("距离当前位置2.3公里 >>", style: TextStyle(color: Color(0xFF222222), fontSize: 15.sp),),
  72. ),
  73. ],
  74. );
  75. }
  76. Widget _detail() {
  77. return Container(
  78. alignment: Alignment.centerLeft,
  79. child: Text("农机手1的收割机", style: TextStyle(color: Color(0xFF222222), fontSize: 15.sp),),
  80. );
  81. }