fix: center room card long badge area

This commit is contained in:
zhx 2026-05-18 12:45:57 +08:00
parent 27c89a9f9e
commit 8e3798e85c

View File

@ -463,13 +463,10 @@ class _RoomUserInfoCardState extends State<RoomUserInfoCard> {
height: 20.w,
fontSize: 9.sp,
),
_buildHeaderLongBadgeStrip(
profile?.id ?? widget.userId,
ref,
profile,
),
],
),
SizedBox(height: 3.w),
_buildHeaderLongBadgeStrip(profile?.id ?? widget.userId, ref, profile),
SizedBox(height: 2.w),
_buildSpecialIdMetaRow(context, profile),
],
@ -561,20 +558,21 @@ class _RoomUserInfoCardState extends State<RoomUserInfoCard> {
SocialChatUserProfileManager ref,
SocialChatUserProfile? profile,
) {
return ConstrainedBox(
constraints: BoxConstraints(maxWidth: 140.w),
child: SCUserBadgeStrip(
userId: userId,
fallbackBadges: _roomCardFallbackBadges(ref, profile),
displayScope: SCUserBadgeDisplayScope.long,
height: 45.w,
badgeHeight: 20.w,
longBadgeWidth: 62.w,
spacing: 4.w,
wrap: true,
maxWrapRows: 2,
scrollLastWrapRow: true,
reserveSpace: false,
return SizedBox(
width: double.infinity,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: SCUserBadgeStrip(
userId: userId,
fallbackBadges: _roomCardFallbackBadges(ref, profile),
displayScope: SCUserBadgeDisplayScope.long,
height: 62.w,
badgeHeight: 57.5.w,
longBadgeWidth: 145.w,
spacing: 12.w,
wrap: true,
reserveSpace: false,
),
),
);
}