ZetaAvatar.fromName constructor
- Key? key,
- required String name,
- ZetaAvatarSize size = ZetaAvatarSize.xl,
- Widget? lowerBadge,
- Widget? upperBadge,
- Color? borderColor,
- Color? backgroundColor,
- String? semanticLabel = 'avatar',
- String? semanticUpperBadgeLabel = 'upperBadge',
- String? semanticLowerBadgeLabel = 'lowerBadge',
- TextStyle? initialTextStyle,
- String? label,
- TextStyle? labelTextStyle,
- int labelMaxLines = 1,
- VoidCallback? onTap,
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,
this.label,
this.labelTextStyle,
this.labelMaxLines = 1,
this.onTap,
}) : image = null,
initials = name.initials;