text优化

This commit is contained in:
fuenmao 2025-01-07 12:35:22 +08:00
parent bd635a53b6
commit 976b76adae
1 changed files with 46 additions and 44 deletions

View File

@ -57,11 +57,13 @@ class MeetingMainVoiceComponent extends StatelessWidget {
), ),
SizedBox(height: 6.h), SizedBox(height: 6.h),
users[index].enableMicr == true users[index].enableMicr == true
? Row( ? Text.rich(
mainAxisAlignment: MainAxisAlignment.center, maxLines: 1,
crossAxisAlignment: CrossAxisAlignment.center, overflow: TextOverflow.ellipsis,
TextSpan(
children: [ children: [
Container( WidgetSpan(
child: Container(
width: 20.w, width: 20.w,
height: 20.h, height: 20.h,
child: LiquidCustomProgressIndicator( child: LiquidCustomProgressIndicator(
@ -71,42 +73,42 @@ class MeetingMainVoiceComponent extends StatelessWidget {
direction: Axis.vertical, direction: Axis.vertical,
shapePath: ViewSvgPath.getMicrpphonePath() shapePath: ViewSvgPath.getMicrpphonePath()
), ),
)
), ),
SizedBox( TextSpan(
width: 70, text: users[index].userName,
child: Text(
users[index].userName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
color: ColorUtil.Color_255_255_255), color: ColorUtil.Color_255_255_255),
), ),
)
], ],
),
textAlign: TextAlign.left,
) )
: Row( : Text.rich(
mainAxisAlignment: MainAxisAlignment.center, maxLines: 1,
crossAxisAlignment: CrossAxisAlignment.center, overflow: TextOverflow.ellipsis,
TextSpan(
children: [ children: [
Image.asset( WidgetSpan(
child: Image.asset(
'assets/images/meeting_main_microphone_open.png', 'assets/images/meeting_main_microphone_open.png',
width: 20.w, width: 20.w,
height: 20.h, height: 20.h,
)
), ),
SizedBox( TextSpan(
width: 70, text: users[index].userName,
child: Text(
users[index].userName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
color: ColorUtil.Color_255_255_255), color: ColorUtil.Color_255_255_255),
), ),
)
], ],
), ),
textAlign: TextAlign.left,
)
], ],
); );
})), })),