Skip to content

Commit

Permalink
feat!: 450 - import only "openfoodfacts.dart"; all code in "src" fold…
Browse files Browse the repository at this point in the history
…er (#655)

New file:
* `open_food_api_client.dart`: contains the _code_ previously stored in `openfoodfacts.dart`

Impacted files:
* `openfoodfacts.dart`: now only `export`ing all relevant files
* test files: now they import only `openfoodfacts/openfoodfacts.dart`
* `product_state.dart`: renamed from `state.dart` to `ProductState`, as `State` is used for `StatefulWidget`s and that would make upgrade painful
* `nutrient_levels.dart`: renamed `Level` as `NutrientLevel` to fix confusion with `Level` in `knowledge_panel.dart`
* all code files: moved to `src` folder; now `import`ing relative files instead of openfoodfacts package files
  • Loading branch information
monsieurtanuki committed Dec 26, 2022
1 parent cc4eb2c commit d05d49c
Show file tree
Hide file tree
Showing 208 changed files with 1,736 additions and 1,833 deletions.
3 changes: 0 additions & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import 'dart:async';

import 'package:openfoodfacts/model/ocr_ingredients_result.dart';
import 'package:openfoodfacts/model/product_result_v3.dart';
import 'package:openfoodfacts/openfoodfacts.dart';
import 'package:openfoodfacts/utils/tag_type.dart';

/// request a product from the OpenFoodFacts database
Future<Product?> getProduct() async {
Expand Down
14 changes: 0 additions & 14 deletions lib/model/parameter/states_tags_parameter.dart

This file was deleted.

0 comments on commit d05d49c

Please sign in to comment.