UserAvatar
A circular profile picture that identifies a user.
When model is null or the load fails, it shows a fallback instead of a blank circle: the letter when given, otherwise a profile silhouette, or a building icon for a pro account.
![]()
![]()
Parameters
applied to the avatar
avatar diameter (32dp, 40dp, or 64dp) and matching online badge size
ignore style and fill the parent; use it when a fixed-size slot already sets the avatar size
image to load, for example the user photo URL; null shows the fallback icon
background behind the fallback icon; match it to the surface behind the avatar, or leave Color.Unspecified for a transparent background; the letter fallback ignores it
mark a professional account so the fallback shows a building icon; it shows only in the fallback state, and letter takes precedence over it
first letter of the user name to show on a neutral circle in the fallback state; it renders as given, so pass the case you want; null shows the fallback icon
optional overlay badge slot; call AvatarAddonScope.onlineIndicator for the standard presence dot, or AvatarAddonScope.custom for arbitrary content; defaults to empty