mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-21 12:11:06 +03:00
fix avatar fallback (#14458)
* fix avatar fallback Signed-off-by: 21pages <sunboeasy@gmail.com> * fix(ui): improve avatar fallback handling and layout consistency - Always show spacing in account section regardless of avatar presence - Handle null return from buildAvatarWidget with proper fallback - Adjust mobile settings avatar size to 28 Signed-off-by: 21pages <sunboeasy@gmail.com> --------- Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -2039,7 +2039,7 @@ class _AccountState extends State<_Account> {
|
||||
return Row(
|
||||
children: [
|
||||
if (avatarWidget != null) avatarWidget,
|
||||
if (avatarWidget != null) const SizedBox(width: 12),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
@@ -569,11 +569,12 @@ class _CmHeaderState extends State<_CmHeader>
|
||||
|
||||
Widget _buildClientAvatar() {
|
||||
return buildAvatarWidget(
|
||||
avatar: client.avatar,
|
||||
size: 70,
|
||||
borderRadius: 15,
|
||||
fallback: _buildInitialAvatar(),
|
||||
)!;
|
||||
avatar: client.avatar,
|
||||
size: 70,
|
||||
borderRadius: 15,
|
||||
fallback: _buildInitialAvatar(),
|
||||
) ??
|
||||
_buildInitialAvatar();
|
||||
}
|
||||
|
||||
Widget _buildInitialAvatar() {
|
||||
|
||||
Reference in New Issue
Block a user