User Avatar / Userpic

avatar

Avatars can be used to represent a person, company or object. It can be a photo, icon, or letters.

Usage

XelaUserAvatar(
    icon: Icon(Icons.account_circle, color: Colors.white),
    size: XelaUserAvatarSize.SMALL,
)

XelaUserAvatar(
    initials: "AB",
    background: XelaColor.Orange9,
    foreground: XelaColor.Orange3,
    size: XelaUserAvatarSize.MEDIUM,
)

XelaUserAvatar(
  image: Image.asset("assets/images/user_avatar.png", fit: BoxFit.fill,),
  size: XelaUserAvatarSize.LARGE,
),

Properties

Name Type Default Value Required Description
size XelaUserAvatarSize XelaUserAvatarSize.MEDIUM NO Size for avatar (LARGE, MEDIUM, SMALL)
style XelaUserAvatarStyle XelaUserAvatarStyle.RECTANGLE NO Style for avatar (CIRCLE, RECTANGLE)
initials String? null NO Initials String for avatar
icon Widget? null NO Icon widget
image Widget? null NO Image widget
count Int 0 NO Count for decoration COUNTER
decoration XelaUserAvatarDecoration? null NO Decoration for avatar (COUNTER, INDICATOR, PLUS)
decorationPosition XelaUserAvatarDecorationPosition XelaUserAvatarDecorationPosition.BOTTOMRIGHT NO Decoration Position for avatar (BOTTOMRIGHT, TOPRIGHT)
background Color XelaColor.Blue7 NO Background color for avatar
foreground Color Colors.White NO Foreground color for icon rendered as template or initials
plusIcon Widget? null NO Plus icon widget for decoration PLUS
decorationBorderColor Color Colors.White NO Border color for decorations
decorationBackground Color XelaColor.Red3 NO Background color for decorations
decorationForeground Color Colors.white NO Foreground color for decoration