import 'package:flutter/material.dart'; import 'package:lszlgl/config/borders.dart'; class StorehouseItem extends StatelessWidget { final String? left; final String? right; final bool special; const StorehouseItem({ super.key, this.left, this.right, this.special = false, }); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.symmetric(vertical: 4), child: Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded( child: Text( left ?? '', style: special ? TextStyles.titA : TextStyles.titB, maxLines: null, ), ), const SizedBox(width: 20), Expanded( child: special ? Padding( padding: const EdgeInsets.only(left: 40), child: Container( alignment: Alignment.center, decoration: BoxDecoration( color: const Color(0xFFE0F2F1), border: Border.all(color: const Color(0xFF4DB6AC), width: 1.0), borderRadius: BorderRadius.circular(12) // 设置边框样式 ), child: Text(right ?? '', style: const TextStyle(fontSize: 14, color: Color(0xFF4DB6AC)))), ) : Text( right ?? '', style: TextStyles.titC, maxLines: null, textAlign: TextAlign.right, ), ), ], ), ); } } // 绿色圆点加标题 class StoreHouseTit extends StatelessWidget { final String tit; const StoreHouseTit({super.key, required this.tit}); @override Widget build(BuildContext context) { return Container( height: 44, decoration: const BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(12)), gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [Color.fromARGB(255, 224, 245, 255), Color(0xFFFFFFFF)])), // padding: const EdgeInsets.only(left: 6), child: Row( children: [ Container( width: 3, height: 18, decoration: const BoxDecoration( color: Color(0xFF60B5F4), borderRadius: BorderRadius.all(Radius.circular(2))), ), const SizedBox(width: 4), Text(tit, style: const TextStyle(fontSize: 15, fontWeight: FontWeight.w600)) ], ), ); } } class SHImageAndNameWidget extends StatelessWidget { final String image; final String title; final String? content; final String imageR; final String titleR; final String? contentR; final double fontSize; const SHImageAndNameWidget( {super.key, required this.image, required this.title, required this.content, required this.fontSize, required this.imageR, required this.titleR, required this.contentR}); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.all(12.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Flexible( flex: 5, child: Row( children: [ Image.asset( image, width: 32, height: 32, ), const SizedBox( width: 6, ), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( title, style: TextStyle( fontWeight: FontWeight.bold, fontSize: fontSize, color: Colors.grey), ), Text( content ?? '', style: TextStyle(fontWeight: FontWeight.bold, fontSize: fontSize), ) ], ), ) ], ), ), Flexible( flex: 4, child: Row( children: [ Image.asset( imageR, width: 32, height: 32, ), const SizedBox( width: 6, ), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( titleR, style: TextStyle( fontWeight: FontWeight.bold, fontSize: fontSize, color: Colors.grey), ), Text( contentR ?? '', style: TextStyle(fontWeight: FontWeight.bold, fontSize: fontSize), ) ], ), ) ], ), ) ], ), ); } } // const Color(0xFFE0F2F1) const Color(0xFF4DB6AC) // Text(right ?? '',style:const TextStyle(fontSize: 15,color: Color(0xFF4DB6AC