mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Delete unused files
This commit is contained in:
@@ -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
@@ -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,
|
||||
};
|
||||
Reference in New Issue
Block a user