copyWith method

GiftBackground copyWith({
  1. int? centerColor,
  2. int? edgeColor,
  3. int? textColor,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

GiftBackground copyWith({int? centerColor, int? edgeColor, int? textColor}) =>
    GiftBackground(
      centerColor: centerColor ?? this.centerColor,
      edgeColor: edgeColor ?? this.edgeColor,
      textColor: textColor ?? this.textColor,
    );