Delete unused files

This commit is contained in:
Roland Geider
2025-09-24 13:03:00 +02:00
parent 530efd366e
commit 7f8657376a
3 changed files with 0 additions and 1105 deletions

View File

@@ -1,40 +0,0 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'ingredient_api.freezed.dart';
part 'ingredient_api.g.dart';
/// Model for the search results returned from the /api/v2/ingredient/search endpoint
@freezed
sealed class IngredientApiSearchDetails with _$IngredientApiSearchDetails {
factory IngredientApiSearchDetails({
required int id,
required String name,
required String? image,
// ignore: invalid_annotation_target
@JsonKey(name: 'image_thumbnail') required String? imageThumbnail,
}) = _IngredientApiSearchDetails;
factory IngredientApiSearchDetails.fromJson(Map<String, dynamic> json) =>
_$IngredientApiSearchDetailsFromJson(json);
}
@freezed
sealed class IngredientApiSearchEntry with _$IngredientApiSearchEntry {
factory IngredientApiSearchEntry({
required String value,
required IngredientApiSearchDetails data,
}) = _IngredientApiSearchEntry;
factory IngredientApiSearchEntry.fromJson(Map<String, dynamic> json) =>
_$IngredientApiSearchEntryFromJson(json);
}
@freezed
sealed class IngredientApiSearch with _$IngredientApiSearch {
factory IngredientApiSearch({
required List<IngredientApiSearchEntry> suggestions,
}) = _IngredientApiSearch;
factory IngredientApiSearch.fromJson(Map<String, dynamic> json) =>
_$IngredientApiSearchFromJson(json);
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,47 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'ingredient_api.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_IngredientApiSearchDetails _$IngredientApiSearchDetailsFromJson(Map<String, dynamic> json) =>
_IngredientApiSearchDetails(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
image: json['image'] as String?,
imageThumbnail: json['image_thumbnail'] as String?,
);
Map<String, dynamic> _$IngredientApiSearchDetailsToJson(_IngredientApiSearchDetails instance) =>
<String, dynamic>{
'id': instance.id,
'name': instance.name,
'image': instance.image,
'image_thumbnail': instance.imageThumbnail,
};
_IngredientApiSearchEntry _$IngredientApiSearchEntryFromJson(Map<String, dynamic> json) =>
_IngredientApiSearchEntry(
value: json['value'] as String,
data: IngredientApiSearchDetails.fromJson(json['data'] as Map<String, dynamic>),
);
Map<String, dynamic> _$IngredientApiSearchEntryToJson(_IngredientApiSearchEntry instance) =>
<String, dynamic>{
'value': instance.value,
'data': instance.data,
};
_IngredientApiSearch _$IngredientApiSearchFromJson(Map<String, dynamic> json) =>
_IngredientApiSearch(
suggestions: (json['suggestions'] as List<dynamic>)
.map((e) => IngredientApiSearchEntry.fromJson(e as Map<String, dynamic>))
.toList(),
);
Map<String, dynamic> _$IngredientApiSearchToJson(_IngredientApiSearch instance) =>
<String, dynamic>{
'suggestions': instance.suggestions,
};