Skip to main content
The Stac CircleAvatar allows you to build a Flutter circle avatar widget using JSON. To know more about the circle avatar widget in Flutter, refer to the official documentation.

Properties

PropertyTypeDescription
childStacWidgetThe widget to display inside the circle avatar.
backgroundColorStacColorThe background color of the circle avatar.
backgroundImageStringThe background image of the circle avatar.
foregroundImageStringThe foreground image of the circle avatar.
onBackgroundImageErrorStacActionThe error widget to display if the background image fails to load.
onForegroundImageErrorStacActionThe error widget to display if the foreground image fails to load.
foregroundColorStacColorThe color of the circle avatar’s foreground elements.
radiusdoubleThe radius of the circle avatar.
minRadiusdoubleThe minimum radius of the circle avatar.
maxRadiusdoubleThe maximum radius of the circle avatar.

Example

StacCircleAvatar(
  backgroundColor: StacColors.red,
  foregroundColor: StacColors.white,
  backgroundImage: 'https://raw.githubusercontent.com/StacDev/stac/refs/heads/dev/assets/companies/bettrdo.jpg',
  radius: 50,
  child: StacText(data: 'A'),
)