forked from eatvio/eatvio_app
17 lines
468 B
Dart
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);
|
|
} |