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,56 +57,58 @@ 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,
children: [ TextSpan(
Container( children: [
width: 20.w, WidgetSpan(
height: 20.h, child: Container(
child: LiquidCustomProgressIndicator( width: 20.w,
value: users[index].volume ?? 0.0, height: 20.h,
valueColor: const AlwaysStoppedAnimation(ColorUtil.Color_2_177_136), child: LiquidCustomProgressIndicator(
backgroundColor: ColorUtil.Color_255_255_255, value: users[index].volume ?? 0.0,
direction: Axis.vertical, valueColor: const AlwaysStoppedAnimation(ColorUtil.Color_2_177_136),
shapePath: ViewSvgPath.getMicrpphonePath() backgroundColor: ColorUtil.Color_255_255_255,
direction: Axis.vertical,
shapePath: ViewSvgPath.getMicrpphonePath()
),
)
), ),
), TextSpan(
SizedBox( text: users[index].userName,
width: 70,
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),
), ),
)
],
)
: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
'assets/images/meeting_main_microphone_open.png',
width: 20.w,
height: 20.h,
),
SizedBox(
width: 70,
child: Text(
users[index].userName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 12.sp,
color: ColorUtil.Color_255_255_255),
),
)
], ],
), ),
textAlign: TextAlign.left,
)
: Text.rich(
maxLines: 1,
overflow: TextOverflow.ellipsis,
TextSpan(
children: [
WidgetSpan(
child: Image.asset(
'assets/images/meeting_main_microphone_open.png',
width: 20.w,
height: 20.h,
)
),
TextSpan(
text: users[index].userName,
style: TextStyle(
fontSize: 12.sp,
color: ColorUtil.Color_255_255_255),
),
],
),
textAlign: TextAlign.left,
)
], ],
); );
})), })),