forked from eatvio/eatvio_app
refactor(diary): API connect attempt
This commit is contained in:
17
lib/features/diary/models/portion.dart
Normal file
17
lib/features/diary/models/portion.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'portion.freezed.dart';
|
||||
part 'portion.g.dart';
|
||||
|
||||
@freezed
|
||||
class Portion with _$Portion {
|
||||
const factory Portion({
|
||||
required int id,
|
||||
required String productName,
|
||||
required int quantity,
|
||||
required String portion,
|
||||
}) = _Portion;
|
||||
|
||||
factory Portion.fromJson(Map<String, Object?> json) =>
|
||||
_$PortionFromJson(json);
|
||||
}
|
||||
Reference in New Issue
Block a user