Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: now using static Nutriments field from new off-dart version #1190

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/smooth_app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ SPEC CHECKSUMS:
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
path_provider_ios: 7d7ce634493af4477d156294792024ec3485acd5
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
permission_handler_apple: d21b38e1a4b2e041c63af9568f9165e114e507a6
PromisesObjC: 68159ce6952d93e17b2dfe273b8c40907db5ba58
Protobuf: 235750e4696ff59fb07d949a9dbbc92b3c0700fe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'package:openfoodfacts/model/OrderedNutrient.dart';
import 'package:openfoodfacts/model/OrderedNutrients.dart';
import 'package:openfoodfacts/model/Product.dart';
import 'package:openfoodfacts/utils/UnitHelper.dart';
import 'package:smooth_app/pages/product/tmp_to_off_nutriments.dart';

/// Nutrition data, for nutrient order and conversions.
class NutritionContainer {
Expand Down Expand Up @@ -226,7 +225,7 @@ class NutritionContainer {
void _populateOrderedNutrientList(final List<OrderedNutrient> list) {
for (final OrderedNutrient nutrient in list) {
if (nutrient.id != _energyKJId &&
!TmpToOffNutriments.supportedNutrientIds.contains(nutrient.id)) {
!Nutriments.supportedNutrientIds.contains(nutrient.id)) {
continue;
}
final bool nowEnergy =
Expand Down
69 changes: 0 additions & 69 deletions packages/smooth_app/lib/pages/product/tmp_to_off_nutriments.dart

This file was deleted.

2 changes: 1 addition & 1 deletion packages/smooth_app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ packages:
name: openfoodfacts
url: "https://pub.dartlang.org"
source: hosted
version: "1.12.0"
version: "1.13.0"
package_config:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion packages/smooth_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies:
latlong2: ^0.8.1
matomo_forever: ^1.0.0+1
modal_bottom_sheet: ^2.0.1
openfoodfacts: ^1.12.0
openfoodfacts: ^1.13.0
# openfoodfacts:
# path: ../../../openfoodfacts-dart
package_info_plus: ^1.4.0
Expand Down