Files
eatvio_app/lib/features/create_recipe/models/ingredient.dart
2025-05-21 17:42:43 +03:00

17 lines
468 B
Dart

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<String, Object?> json) => _$IngredientFromJson(json);
}