|
|
|
@ -61,54 +61,6 @@ class _CardHeader extends StatelessWidget { |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
// if (isOnline) |
|
|
|
// Positioned( |
|
|
|
// right: 6, |
|
|
|
// bottom: 1, |
|
|
|
// child: Container( |
|
|
|
// width: 12, |
|
|
|
// height: 12, |
|
|
|
// decoration: BoxDecoration( |
|
|
|
// color: isOnline |
|
|
|
// ? const Color(0xFF2ED573) |
|
|
|
// : const Color(0xFFCCCCCC), // 在线绿色,离线灰色 |
|
|
|
// shape: BoxShape.circle, |
|
|
|
// boxShadow: isOnline |
|
|
|
// ? const [ |
|
|
|
// BoxShadow( |
|
|
|
// color: Color(0x332ED573), |
|
|
|
// blurRadius: 4, |
|
|
|
// offset: Offset(0, 2), |
|
|
|
// ), |
|
|
|
// ] |
|
|
|
// : [], |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// if (isLive) |
|
|
|
// Positioned( |
|
|
|
// bottom: 0, |
|
|
|
// left: 0, |
|
|
|
// right: 0, |
|
|
|
// child: Container( |
|
|
|
// width: 37, |
|
|
|
// height: 14, |
|
|
|
// alignment: Alignment.center, // 关键:让子内容居中 |
|
|
|
// decoration: BoxDecoration( |
|
|
|
// image: DecorationImage( |
|
|
|
// image: AssetImage(Assets.imagesBtnBgIcon), |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// child: const Text( |
|
|
|
// '直播中', |
|
|
|
// style: TextStyle( |
|
|
|
// color: Colors.white, |
|
|
|
// fontSize: 8, |
|
|
|
// fontWeight: FontWeight.w600, |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
], |
|
|
|
), |
|
|
|
const SizedBox(width: 10), |
|
|
|
@ -135,26 +87,6 @@ class _CardHeader extends StatelessWidget { |
|
|
|
maxLines: 1, |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
), |
|
|
|
// 在线徽标 |
|
|
|
// if (isOnline == true) |
|
|
|
// Container( |
|
|
|
// padding: const EdgeInsets.symmetric( |
|
|
|
// horizontal: 8, |
|
|
|
// vertical: 2, |
|
|
|
// ), |
|
|
|
// decoration: BoxDecoration( |
|
|
|
// color: Color.fromRGBO(234, 255, 219, 1), |
|
|
|
// borderRadius: BorderRadius.circular(12), |
|
|
|
// ), |
|
|
|
// child: Text( |
|
|
|
// isOnline ? '在线' : '', |
|
|
|
// style: TextStyle( |
|
|
|
// fontSize: 9, |
|
|
|
// color: Color.fromRGBO(38, 199, 124, 1), |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// 实名徽标 |
|
|
|
if (item.isRealNameCertified == true) |
|
|
|
Container( |
|
|
|
padding: const EdgeInsets.symmetric( |
|
|
|
@ -288,8 +220,8 @@ class _CardHeader extends StatelessWidget { |
|
|
|
}, |
|
|
|
child: Image.asset( |
|
|
|
_getButtonImage(isLive, isOnline), |
|
|
|
width: isLive ? 60 : 40, |
|
|
|
height: 20, |
|
|
|
width: isLive ? 60 : 50, |
|
|
|
height: 30, |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
@ -324,13 +256,7 @@ class ContentCard extends StatelessWidget { |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: Colors.white, |
|
|
|
borderRadius: BorderRadius.circular(12), |
|
|
|
boxShadow: const [ |
|
|
|
BoxShadow( |
|
|
|
color: Color(0x14000000), |
|
|
|
blurRadius: 8, |
|
|
|
offset: Offset(0, 4), |
|
|
|
), |
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
padding: const EdgeInsets.all(12), |
|
|
|
child: Column( |
|
|
|
@ -338,7 +264,6 @@ class ContentCard extends StatelessWidget { |
|
|
|
children: [ |
|
|
|
// 头部:头像、昵称、在线状态、按钮等 - 所有按钮都放在HI位置 |
|
|
|
_CardHeader(item: item), |
|
|
|
const SizedBox(height: 8), |
|
|
|
|
|
|
|
// 内容区域 - 根据类型显示不同内容 |
|
|
|
_buildContent(), |
|
|
|
@ -372,7 +297,7 @@ class ContentCard extends StatelessWidget { |
|
|
|
|
|
|
|
// 根据接口返回的图片列表动态显示图片 |
|
|
|
if (item.photoList != null && item.photoList!.isNotEmpty) { |
|
|
|
contentWidgets.add(const SizedBox(height: 16)); |
|
|
|
contentWidgets.add(const SizedBox(height: 6)); |
|
|
|
|
|
|
|
// 计算固定宽度:每张图片的宽度 = (屏幕宽度 - 卡片左右padding - ListView左右padding - 图片间距) / 3 |
|
|
|
// 卡片左右padding: 12 * 2 = 24 |
|
|
|
|