opt: staff: use fixed width

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-11-17 11:43:41 +08:00
parent 5d0746a7d0
commit 00c71ce692

View File

@@ -318,34 +318,37 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
: SelfSizedHorizontalList( : SelfSizedHorizontalList(
gapSize: 10, gapSize: 10,
itemCount: videoItem['staff'].length, itemCount: videoItem['staff'].length,
childBuilder: (index) => Column( childBuilder: (index) => Container(
mainAxisSize: MainAxisSize.min, width: 70,
children: [ alignment: Alignment.center,
GestureDetector( child: GestureDetector(
onTap: () => Get.toNamed( onTap: () => Get.toNamed(
'/member?mid=${videoItem['staff'][index].mid}', '/member?mid=${videoItem['staff'][index].mid}',
arguments: { arguments: {
'face': videoItem['staff'][index].face, 'face': videoItem['staff'][index].face,
heroTag: Utils.makeHeroTag( heroTag: Utils.makeHeroTag(
videoItem['staff'][index].mid), videoItem['staff'][index].mid),
}), }),
child: NetworkImgLayer( child: Column(
type: 'avatar', mainAxisSize: MainAxisSize.min,
src: videoItem['staff'][index].face, children: [
width: 40, NetworkImgLayer(
height: 40, type: 'avatar',
fadeInDuration: Duration.zero, src: videoItem['staff'][index].face,
fadeOutDuration: Duration.zero, width: 40,
), height: 40,
), fadeInDuration: Duration.zero,
const SizedBox(height: 2), fadeOutDuration: Duration.zero,
Text( ),
videoItem['staff'][index].name.length > 5 const SizedBox(height: 2),
? '${videoItem['staff'][index].name.toString().substring(0, 5)}...' Text(
: videoItem['staff'][index].name, videoItem['staff'][index].name,
style: TextStyle( maxLines: 1,
color: overflow: TextOverflow.ellipsis,
videoItem['staff'][index].vip.status > style: TextStyle(
color: videoItem['staff'][index]
.vip
.status >
0 && 0 &&
videoItem['staff'][index] videoItem['staff'][index]
.vip .vip
@@ -353,17 +356,20 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
2 2
? Utils.vipColor ? Utils.vipColor
: null, : null,
), ),
),
Text(
videoItem['staff'][index].title,
style: TextStyle(
fontSize: 12,
color: Theme.of(context)
.colorScheme
.outline,
),
),
],
), ),
Text( ),
videoItem['staff'][index].title,
style: TextStyle(
fontSize: 12,
color:
Theme.of(context).colorScheme.outline,
),
),
],
), ),
), ),
), ),