copyWith method

ZeroAvatarStyle copyWith({
  1. Color? backgroundColor,
  2. Color? badgeColor,
  3. Color? borderColor,
  4. Color? initialColor,
  5. TextStyle? initialStyle,
})

If the caller passes in a value for a parameter, use that value, otherwise use the value from this object.

A new instance of ZeroAvatarStyle with the same properties as the original instance, except for the properties that are explicitly overridden.

Implementation

ZeroAvatarStyle copyWith({
  Color? backgroundColor,
  Color? badgeColor,
  Color? borderColor,
  Color? initialColor,
  TextStyle? initialStyle,
}) {
  return ZeroAvatarStyle(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    badgeColor: badgeColor ?? this.badgeColor,
    borderColor: borderColor ?? this.borderColor,
    initialColor: initialColor ?? this.initialColor,
    initialStyle: initialStyle ?? this.initialStyle,
  );
}