copyWith method

PanelsModel copyWith({
  1. bool? availability,
  2. String? brand,
  3. DateTime? createdAt,
  4. bool? defaultChoice,
  5. String? id,
  6. double? power,
  7. double? price,
  8. DateTime? updatedAt,
})

Implementation

PanelsModel copyWith({
  bool? availability,
  String? brand,
  DateTime? createdAt,
  bool? defaultChoice,
  String? id,
  double? power,
  double? price,
  DateTime? updatedAt,
}) {
  return PanelsModel(
    availability: availability ?? this.availability,
    brand: brand ?? this.brand,
    createdAt: createdAt ?? this.createdAt,
    defaultChoice: defaultChoice ?? this.defaultChoice,
    id: id ?? this.id,
    power: power ?? this.power,
    price: price ?? this.price,
    updatedAt: updatedAt ?? this.updatedAt,
  );
}