forked from eatvio/eatvio_app
19 lines
413 B
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);
|
|
}
|