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),
users[index].enableMicr == true
? Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 20.w,
height: 20.h,
child: LiquidCustomProgressIndicator(
value: users[index].volume ?? 0.0,
valueColor: const AlwaysStoppedAnimation(ColorUtil.Color_2_177_136),
backgroundColor: ColorUtil.Color_255_255_255,
direction: Axis.vertical,
shapePath: ViewSvgPath.getMicrpphonePath()
? Text.rich(
maxLines: 1,
overflow: TextOverflow.ellipsis,
TextSpan(
children: [
WidgetSpan(
child: Container(
width: 20.w,
height: 20.h,
child: LiquidCustomProgressIndicator(
value: users[index].volume ?? 0.0,
valueColor: const AlwaysStoppedAnimation(ColorUtil.Color_2_177_136),
backgroundColor: ColorUtil.Color_255_255_255,
direction: Axis.vertical,
shapePath: ViewSvgPath.getMicrpphonePath()
),
)
),
),
SizedBox(
width: 70,
child: Text(
users[index].userName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
TextSpan(
text: users[index].userName,
style: TextStyle(
fontSize: 12.sp,
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,
)
],
);
})),