Skip to content

Avatar

A circular avatar component that displays user images with various configurations and layouts.

The Avatar widget provides consistent styling and behavior options for different avatar layouts. It handles loading errors, sizing options, and various customization features.

  • Avatar Types: Basic, Meta, Content, Stacked
  • States: Error handling with fallback
  • Customizable: Supports custom sizes, colors, error states, and layouts

A simple circular avatar.



Avatar with just a title.


Avatar with title and subtitle.


Reversed layout with longer text content.


Multiple avatars with descriptive text.


Multiple avatars with overflow counter.


The Avatar component automatically handles image loading errors by displaying a fallback:

  1. Default fallback shows a person icon
  2. Custom fallback can be provided via errorImage
  3. Maintains consistent size and shape

PropertyTypeDescription
imageStringURL or asset path of the avatar image
errorImageWidget?Widget to display when image fails to load
sizeAvatarSizePredefined size of the avatar (xs, sm, md, lg, xl, xxl)
backgroundColorColor?Background color of the avatar
PropertyTypeDescription
titleStringPrimary text displayed next to avatar
subtitleString?Secondary text displayed below title
titleStyleTextStyle?Custom style for title text
subtitleStyleTextStyle?Custom style for subtitle text
PropertyTypeDescription
imagesList<String>List of image URLs or paths to display
limitintMaximum number of visible avatars
labelString?Text to display after the stack
counterStyleTextStyle?Style for the overflow counter