copyWith method
- ZetaAvatarSize? size,
- Widget? image,
- String? initials,
- Color? backgroundColor,
- Color? borderColor,
- ZetaAvatarBadge? lowerBadge,
- ZetaAvatarBadge? upperBadge,
Return copy of avatar with certain changed fields
Implementation
ZetaAvatar copyWith({
ZetaAvatarSize? size,
Widget? image,
String? initials,
Color? backgroundColor,
Color? borderColor,
ZetaAvatarBadge? lowerBadge,
ZetaAvatarBadge? upperBadge,
}) {
return ZetaAvatar(
size: size ?? this.size,
image: image ?? this.image,
initials: initials ?? this.initials,
backgroundColor: backgroundColor ?? this.backgroundColor,
borderColor: borderColor ?? this.borderColor,
lowerBadge: lowerBadge ?? this.lowerBadge,
upperBadge: upperBadge ?? this.upperBadge,
);
}