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