forked from openfoodfacts/openfoodfacts-dart
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New file: * `location_type.dart`: Type of the Location. Impacted files: * `api_prices_test.dart`: refactored with the additional fields * `location.dart`: added fields `locationType` and `websiteUrl` * `location.g.dart`: generated * `maybe_error.dart`: now we accept valid but unreadable responses * `open_prices_api_client.dart`: safer `createPrice` method; refactored with the additional fields * `openfoodfacts.dart`: added file `location_type.dart` * `price.dart`: added field `receiptQuantity` * `price.g.dart`: generated * `price_total_stats.dart`: added fields `locationTypeOsmCount`, `locationTypeOnlineCount`, `proofTypeGdprRequestCount` and `proofTypeShopImportCount` * `price_total_stats.g.dart`: generated * `proof.dart`: added fields `receiptPriceCount` and `receiptPriceTotal` * `proof.g.dart`: generated * `update_price_parameters.dart`: added field `receiptQuantity` * `update_proof_parameters.dart`: added fields `receiptPriceCount`, `receiptPriceTotal`, `locationOSMId` and `locationOSMType`
- Loading branch information
1 parent
b99f119
commit 65010ba
Showing
15 changed files
with
182 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import 'package:json_annotation/json_annotation.dart'; | ||
|
||
import '../model/off_tagged.dart'; | ||
|
||
/// Type of the Location. | ||
enum LocationType implements OffTagged { | ||
@JsonValue('OSM') | ||
osm(offTag: 'OSM'), | ||
@JsonValue('ONLINE') | ||
online(offTag: 'ONLINE'); | ||
|
||
const LocationType({ | ||
required this.offTag, | ||
}); | ||
|
||
@override | ||
final String offTag; | ||
|
||
/// Returns the first [LocationType] that matches the [offTag]. | ||
static LocationType? fromOffTag(final String? offTag) => | ||
OffTagged.fromOffTag(offTag, LocationType.values) as LocationType?; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.