copyWith method

CouponData copyWith({
  1. int? id,
  2. String? code,
  3. String? name,
  4. bool? active,
  5. String? type,
  6. Value<String?> description = const Value.absent(),
})

Implementation

CouponData copyWith({
  int? id,
  String? code,
  String? name,
  bool? active,
  String? type,
  Value<String?> description = const Value.absent(),
}) => CouponData(
  id: id ?? this.id,
  code: code ?? this.code,
  name: name ?? this.name,
  active: active ?? this.active,
  type: type ?? this.type,
  description: description.present ? description.value : this.description,
);