copyWith method

BadgeStyle copyWith({
  1. BadgeShape? shape,
  2. BorderRadius? borderRadius,
  3. Color? badgeColor,
  4. BorderSide? borderSide,
  5. double? elevation,
  6. BadgeGradient? badgeGradient,
  7. BadgeGradient? borderGradient,
  8. EdgeInsetsGeometry? padding,
})

Returns a copy of this BadgeStyle with the given fields replaced.

Implementation

BadgeStyle copyWith({
  BadgeShape? shape,
  BorderRadius? borderRadius,
  Color? badgeColor,
  BorderSide? borderSide,
  double? elevation,
  BadgeGradient? badgeGradient,
  BadgeGradient? borderGradient,
  EdgeInsetsGeometry? padding,
}) {
  return BadgeStyle(
    shape: shape ?? this.shape,
    borderRadius: borderRadius ?? this.borderRadius,
    badgeColor: badgeColor ?? this.badgeColor,
    borderSide: borderSide ?? this.borderSide,
    elevation: elevation ?? this.elevation,
    badgeGradient: badgeGradient ?? this.badgeGradient,
    borderGradient: borderGradient ?? this.borderGradient,
    padding: padding ?? this.padding,
  );
}