copyWith method

ZetaAvatar copyWith({
  1. ZetaAvatarSize? size,
  2. Widget? image,
  3. String? initials,
  4. Color? backgroundColor,
  5. Color? borderColor,
  6. Widget? lowerBadge,
  7. Widget? upperBadge,
  8. String? label,
  9. TextStyle? labelTextStyle,
  10. int? labelMaxLines,
  11. VoidCallback? onTap,
  12. Key? key,
})

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,
  );
}