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,20 +558,21 @@ 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: SCUserBadgeStrip( child: Padding(
userId: userId, padding: EdgeInsets.symmetric(horizontal: 10.w),
fallbackBadges: _roomCardFallbackBadges(ref, profile), child: SCUserBadgeStrip(
displayScope: SCUserBadgeDisplayScope.long, userId: userId,
height: 45.w, fallbackBadges: _roomCardFallbackBadges(ref, profile),
badgeHeight: 20.w, displayScope: SCUserBadgeDisplayScope.long,
longBadgeWidth: 62.w, height: 62.w,
spacing: 4.w, badgeHeight: 57.5.w,
wrap: true, longBadgeWidth: 145.w,
maxWrapRows: 2, spacing: 12.w,
scrollLastWrapRow: true, wrap: true,
reserveSpace: false, reserveSpace: false,
),
), ),
); );
} }