import 'dart:ui' as ui; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:farmer_client/widgets/LinearGradientText.dart'; Widget summary() { return Column( children: [ _title(), SizedBox(height: 20.w,), _desc(), SizedBox(height: 20.w,), _detail(), SizedBox(height: 20.w,), ], ); } Widget _title() { return Row( children: [ Expanded( child: Text("收割机001--S001", style: TextStyle( color: const Color(0xFF222222), fontSize: 18.sp, fontWeight: FontWeight.bold, )), flex: 1), Container( width: 100.w, alignment: Alignment.centerRight, child: LinearGradientText( colors: const [ Color(0xFFFA7878), Color(0xFFB61515), ], child: RichText( text: TextSpan( children: [ TextSpan( text: "450", style: TextStyle( fontSize: 22.sp, fontWeight: FontWeight.bold, )), TextSpan( text: "元/", style: TextStyle( fontSize: 22.sp, fontWeight: FontWeight.bold, )), TextSpan( text: "公顷", style: TextStyle( fontSize: 12.sp, fontWeight: FontWeight.bold, )), ] ), ), ), ) ], ); } Widget _desc() { return Row( children: [ Icon(Icons.location_on_outlined, size: 16.sp,), Expanded( flex: 1, child: Text("距离当前位置2.3公里 >>", style: TextStyle(color: const Color(0xFF222222), fontSize: 15.sp),), ), ], ); } Widget _detail() { return Container( alignment: Alignment.centerLeft, child: Text("农机手1的收割机", style: TextStyle(color: const Color(0xFF222222), fontSize: 15.sp),), ); }