import 'package:cs_resources/constants/color_constants.dart'; import 'package:cs_resources/generated/assets.dart'; import 'package:flutter/material.dart'; import 'package:widgets/ext/ex_widget.dart'; import 'package:widgets/my_load_image.dart'; import 'package:widgets/my_text_view.dart'; /** * 设置页面的Item容器,左侧图标,中间文本,右侧箭头 */ class SettingItemContainer extends StatelessWidget { final String iconPath; final String title; SettingItemContainer({required this.iconPath, required this.title}); @override Widget build(BuildContext context) { return Container( width: double.infinity, height: 60, margin: EdgeInsets.symmetric(vertical: 5, horizontal: 15), padding: EdgeInsets.symmetric(vertical: 0, horizontal: 16.5), decoration: BoxDecoration( color: Color(0xFF4DCFF6).withOpacity(0.2), // 设置背景颜色和不透明度 borderRadius: BorderRadius.circular(5.0), // 设置圆角 ), child: Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: [ MyAssetImage(iconPath, width: 30.2, height: 30.2), MyTextView( title, isFontRegular: true, fontSize: 14, marginLeft: 11, marginRight: 11, textColor: ColorConstants.textGrayAECAE5, ).expanded(), MyAssetImage(Assets.mainItemMoreIcon, width: 7.5, height: 13.5), ], ), ); } }