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