TextAvatar constructor

TextAvatar({
  1. Key? key,
  2. required String text,
  3. Color? backgroundColor,
  4. double radius = 10,
  5. double size = 48.0,
  6. TextStyle? style,
  7. Map<String, Color>? includeColor,
  8. bool upperCase = true,
})

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,
});