copyWith method

Recipe copyWith({
  1. String? name,
  2. RecipeType? type,
  3. bool? exactlyPlaced,
  4. int? exactResult,
  5. Item? result,
  6. Map<int, Item>? ingredients,
  7. double? experience,
  8. int? cookingtime,
  9. int? id,
})

Implementation

Recipe copyWith({
  String? name,
  RecipeType? type,
  bool? exactlyPlaced,
  int? exactResult,
  Item? result,
  Map<int, Item>? ingredients,
  double? experience,
  int? cookingtime,
  int? id,
}) {
  return Recipe(
    ingredients ?? this.ingredients,
    result ?? this.result,
    name: name ?? this.name,
    type: type ?? this.type,
    exactlyPlaced: exactlyPlaced ?? this.exactlyPlaced,
    exactResult: exactResult ?? this.exactResult,
    experience: experience ?? this.experience,
    cookingtime: cookingtime ?? this.cookingtime,
    id: id ?? this.id,
  );
}