copyWith method

PlanModel copyWith({
  1. String? id,
  2. String? name,
  3. String? identifier,
  4. int? interval,
  5. String? intervalType,
  6. String? createdAt,
  7. String? updatedAt,
  8. List<PlanPrice>? prices,
  9. List<PlanFeature>? features,
})

Implementation

PlanModel copyWith({
  String? id,
  String? name,
  String? identifier,
  int? interval,
  String? intervalType,
  String? createdAt,
  String? updatedAt,
  List<PlanPrice>? prices,
  List<PlanFeature>? features,
}) {
  return PlanModel(
    id: id ?? this.id,
    name: name ?? this.name,
    identifier: identifier ?? this.identifier,
    interval: interval ?? this.interval,
    intervalType: intervalType ?? this.intervalType,
    createdAt: createdAt ?? this.createdAt,
    updatedAt: updatedAt ?? this.updatedAt,
    prices: prices ?? this.prices,
    features: features ?? this.features,
  );
}