copyWith method
Return copy of avatar with certain changed fields
Implementation
ZetaAvatar copyWith({
ZetaAvatarSize? size,
Widget? image,
String? initials,
Color? backgroundColor,
Color? borderColor,
Widget? lowerBadge,
Widget? upperBadge,
String? label,
TextStyle? labelTextStyle,
int? labelMaxLines,
VoidCallback? onTap,
Key? key,
}) {
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,
label: label ?? this.label,
labelTextStyle: labelTextStyle ?? this.labelTextStyle,
labelMaxLines: labelMaxLines ?? this.labelMaxLines,
onTap: onTap ?? this.onTap,
key: key ?? this.key,
);
}