123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- 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
|