TextAvatar constructor
TextAvatar({})
Creates a TextAvatar widget with the given parameters.
The text
parameter is required and specifies the text to display inside the avatar.
The size
parameter specifies the size of the circular avatar.
The backgroundColor
parameter specifies the background color of the circular avatar.
The radius
parameter specifies the radius of the circular avatar.
The style
parameter specifies the text style of the text inside the avatar.
The upperCase
parameter specifies whether to show the text in uppercase (default) or lowercase.
The includeColor
parameter specifies a map of letters to custom background colors for the avatars.
Example usage:
TextAvatar(
text: 'John Doe',
size: 48.0,
)
Implementation
TextAvatar({
super.key,
required this.text,
this.backgroundColor,
this.radius = 10,
this.size = 48.0,
this.style,
this.includeColor,
this.upperCase = true,
});