Avatar.initials constructor

const Avatar.initials({
  1. Key? key,
  2. required String? initials,
  3. double size = 32.0,
  4. BorderRadius? borderRadius,
  5. Color? backgroundColor,
  6. Color? foregroundColor,
  7. Color? borderColor,
  8. double borderWidth = 1.0,
  9. VoidCallback? onTap,
  10. String? semanticLabel,
})

Factory for an initials-based avatar.

Implementation

const Avatar.initials({
  super.key,
  required this.initials,
  this.size = 32.0,
  this.borderRadius,
  this.backgroundColor,
  this.foregroundColor,
  this.borderColor,
  this.borderWidth = 1.0,
  this.onTap,
  this.semanticLabel,
})  : type = AvatarType.placeholder,
      image = null,
      imageUrl = null,
      icon = null,
      iconWidget = null;