Skip to content

Commit

Permalink
refactor: now using static Nutriments field from new off-dart version (
Browse files Browse the repository at this point in the history
…#1190)

Deleted file:
* `tmp_to_off_nutriments.dart`

Impacted files:
* `nutrition_container.dart`: now using static field from new off-dart version
* `Podfile.lock`: wtf
* `pubspec.lock`: impacted from `pubspec.yaml`
* `pubspec.yaml`: now using off-dart version 1.13.0
  • Loading branch information
monsieurtanuki authored Mar 10, 2022
1 parent 4ad8232 commit fc3d6fb
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 74 deletions.
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

0 comments on commit fc3d6fb

Please sign in to comment.