ZetaAvatar.fromName constructor

ZetaAvatar.fromName({
  1. Key? key,
  2. required String name,
  3. ZetaAvatarSize size = ZetaAvatarSize.xl,
  4. ZetaAvatarBadge? lowerBadge,
  5. ZetaAvatarBadge? upperBadge,
  6. Color? borderColor,
  7. Color? backgroundColor,
  8. String semanticLabel = 'avatar',
  9. String semanticUpperBadgeLabel = 'upperBadge',
  10. String semanticLowerBadgeLabel = 'lowerBadge',
  11. TextStyle? initialTextStyle,
})

Constructor for ZetaAvatar with initials from a full name.

Implementation

ZetaAvatar.fromName({
  super.key,
  required String name,
  this.size = ZetaAvatarSize.xl,
  this.lowerBadge,
  this.upperBadge,
  this.borderColor,
  this.backgroundColor,
  this.semanticLabel = 'avatar',
  this.semanticUpperBadgeLabel = 'upperBadge',
  this.semanticLowerBadgeLabel = 'lowerBadge',
  this.initialTextStyle,
})  : image = null,
      initials = name.initials;