Files
eatvio_app/lib/features/recipes/models/ingredient.dart

19 lines
413 B
Dart

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