copyWith method

  1. @override
BackgroundStyle copyWith(
  1. covariant BackgroundStyle other
)
override

Creates a new FlameTextStyle, preferring the properties of other if present, falling back to the properties of this.

Implementation

@override
BackgroundStyle copyWith(BackgroundStyle other) {
  return BackgroundStyle(
    paint: other.backgroundPaint ?? backgroundPaint,
    borderColor: other.borderPaint?.color ?? borderPaint?.color,
    borderRadius: other.borderRadius,
    borderWidth: other.borderWidths.top,
  );
}