28 lines
669 B
Dart
28 lines
669 B
Dart
|
import 'dart:convert';
|
||
|
import 'dart:ffi';
|
||
|
|
||
|
import 'package:json_annotation/json_annotation.dart';
|
||
|
|
||
|
part 'Foods_dto.g.dart';
|
||
|
|
||
|
@JsonSerializable(createToJson: false)
|
||
|
class FoodsDto {
|
||
|
final List<FoodDataDto>? foods;
|
||
|
|
||
|
const FoodsDto({this.foods});
|
||
|
|
||
|
factory FoodsDto.fromJson(Map<String, dynamic> json) => _$FoodsDtoFromJson(json);
|
||
|
|
||
|
}
|
||
|
|
||
|
@JsonSerializable(createToJson: false)
|
||
|
class FoodDataDto {
|
||
|
final int? fdcId;
|
||
|
final String? brandName;
|
||
|
final String? description;
|
||
|
final String? image;
|
||
|
|
||
|
const FoodDataDto({this.fdcId, this.brandName, this.description, this.image});
|
||
|
|
||
|
factory FoodDataDto.fromJson(Map<String, dynamic> json) => _$FoodDataDtoFromJson(json);
|
||
|
}
|