import 'package:freezed_annotation/freezed_annotation.dart'; part 'ingredient.freezed.dart'; part 'ingredient.g.dart'; @freezed abstract class Ingredient with _$Ingredient { const factory Ingredient({ required String name, required String unit, required String portion, @JsonKey(name: 'product_nutritional_id') required int productId, }) = _Ingredient; factory Ingredient.fromJson(Map json) => _$IngredientFromJson(json); }