diff --git a/example/lib/main.dart b/example/lib/main.dart index ec11475d9..6a1c151a4 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,8 +1,6 @@ import 'dart:async'; import 'package:openfoodfacts/openfoodfacts.dart'; -import 'package:json_annotation/src/json_value.dart'; -import 'package:openfoodfacts/src/nutripatrol/get_ticket.dart'; void main() { OpenFoodAPIConfiguration.userAgent = UserAgent( diff --git a/lib/openfoodfacts.dart b/lib/openfoodfacts.dart index a99823ea8..16442d66f 100644 --- a/lib/openfoodfacts.dart +++ b/lib/openfoodfacts.dart @@ -48,7 +48,6 @@ export 'src/model/parameter/without_additives.dart'; export 'src/model/per_size.dart'; export 'src/model/product.dart'; export 'src/model/product_freshness.dart'; -export 'src/model/product_type.dart'; export 'src/model/product_image.dart'; export 'src/model/product_packaging.dart'; export 'src/model/product_result_field_answer.dart'; @@ -56,6 +55,7 @@ export 'src/model/product_result_v3.dart'; export 'src/model/product_state.dart'; export 'src/model/product_stats.dart'; export 'src/model/product_tag.dart'; +export 'src/model/product_type.dart'; export 'src/model/recommended_daily_intake.dart'; export 'src/model/robotoff_question.dart'; export 'src/model/robotoff_question_order.dart'; @@ -80,6 +80,12 @@ export 'src/model/taxonomy_packaging_recycling.dart'; export 'src/model/taxonomy_packaging_shape.dart'; export 'src/model/user.dart'; export 'src/model/user_agent.dart'; +export 'src/nutripatrol/create_flag.dart'; +export 'src/nutripatrol/get_flag.dart'; +export 'src/nutripatrol/get_ticket.dart'; +export 'src/nutripatrol/get_tickets.dart'; +export 'src/nutripatrol/update_ticket_status.dart'; +export 'src/nutripatrol_api_client.dart'; export 'src/open_food_api_client.dart'; export 'src/open_food_search_api_client.dart'; export 'src/open_prices_api_client.dart'; @@ -96,11 +102,11 @@ export 'src/prices/flavor.dart'; export 'src/prices/get_locations_order.dart'; export 'src/prices/get_locations_parameters.dart'; export 'src/prices/get_locations_result.dart'; +export 'src/prices/get_price_count_parameters_helper.dart'; // export 'src/prices/get_parameters_helper.dart'; // uncomment if really needed export 'src/prices/get_prices_order.dart'; export 'src/prices/get_prices_parameters.dart'; export 'src/prices/get_prices_result.dart'; -export 'src/prices/get_price_count_parameters_helper.dart'; export 'src/prices/get_proofs_order.dart'; export 'src/prices/get_proofs_parameters.dart'; export 'src/prices/get_proofs_result.dart'; @@ -121,6 +127,7 @@ export 'src/prices/proof_type.dart'; export 'src/prices/session.dart'; export 'src/prices/update_price_parameters.dart'; export 'src/prices/update_proof_parameters.dart'; +export 'src/robot_off_api_client.dart'; export 'src/search/autocomplete_search_result.dart'; export 'src/search/autocomplete_single_result.dart'; export 'src/search/fuzziness.dart'; @@ -152,5 +159,3 @@ export 'src/utils/too_many_requests_manager.dart'; export 'src/utils/unit_helper.dart'; export 'src/utils/uri_helper.dart'; export 'src/utils/uri_reader.dart'; -export 'src/robot_off_api_client.dart'; -export 'src/nutripatrol_api_client.dart'; diff --git a/lib/src/nutripatrol/get_flag.dart b/lib/src/nutripatrol/get_flag.dart index 489b48b44..fea62d7d0 100644 --- a/lib/src/nutripatrol/get_flag.dart +++ b/lib/src/nutripatrol/get_flag.dart @@ -1,6 +1,6 @@ import 'package:json_annotation/json_annotation.dart'; -import 'package:openfoodfacts/openfoodfacts.dart'; import 'package:openfoodfacts/src/nutripatrol/get_ticket.dart'; +import 'package:openfoodfacts/src/prices/flavor.dart'; import '../interface/json_object.dart'; @@ -62,7 +62,7 @@ class Flag extends JsonObject { /// created date of the ticket. Read-only. @JsonKey(name: 'created_at') - late String CreatedAt; + late String createdAt; Flag(); diff --git a/lib/src/nutripatrol/get_flag.g.dart b/lib/src/nutripatrol/get_flag.g.dart index 3419d852e..76a8ccba3 100644 --- a/lib/src/nutripatrol/get_flag.g.dart +++ b/lib/src/nutripatrol/get_flag.g.dart @@ -20,7 +20,7 @@ Flag _$FlagFromJson(Map json) => Flag() ..flavor = $enumDecode(_$FlavorEnumMap, json['flavor']) ..reason = json['reason'] as String? ..comment = json['comment'] as String? - ..CreatedAt = json['created_at'] as String; + ..createdAt = json['created_at'] as String; Map _$FlagToJson(Flag instance) => { 'id': instance.id, @@ -36,7 +36,7 @@ Map _$FlagToJson(Flag instance) => { 'flavor': _$FlavorEnumMap[instance.flavor]!, 'reason': instance.reason, 'comment': instance.comment, - 'created_at': instance.CreatedAt, + 'created_at': instance.createdAt, }; const _$NutripatrolTypeEnumMap = { diff --git a/lib/src/nutripatrol/get_ticket.dart b/lib/src/nutripatrol/get_ticket.dart index 919dd053f..51346a092 100644 --- a/lib/src/nutripatrol/get_ticket.dart +++ b/lib/src/nutripatrol/get_ticket.dart @@ -37,7 +37,7 @@ class Ticket extends JsonObject { /// created date of the ticket. Read-only. @JsonKey(name: 'created_at') - late String CreatedAt; + late String createdAt; Ticket(); diff --git a/lib/src/nutripatrol/get_ticket.g.dart b/lib/src/nutripatrol/get_ticket.g.dart index 27df87e86..71de4de00 100644 --- a/lib/src/nutripatrol/get_ticket.g.dart +++ b/lib/src/nutripatrol/get_ticket.g.dart @@ -14,7 +14,7 @@ Ticket _$TicketFromJson(Map json) => Ticket() ..status = $enumDecode(_$NutripatrolTicketStatusEnumMap, json['status']) ..imageId = json['image_id'] as String? ..flavor = $enumDecode(_$FlavorEnumMap, json['flavor']) - ..CreatedAt = json['created_at'] as String; + ..createdAt = json['created_at'] as String; Map _$TicketToJson(Ticket instance) => { 'id': instance.id, @@ -24,7 +24,7 @@ Map _$TicketToJson(Ticket instance) => { 'status': _$NutripatrolTicketStatusEnumMap[instance.status]!, 'image_id': instance.imageId, 'flavor': _$FlavorEnumMap[instance.flavor]!, - 'created_at': instance.CreatedAt, + 'created_at': instance.createdAt, }; const _$NutripatrolTypeEnumMap = {