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

feat: 999 - added "bool? product.isImageLocked" method #1000

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

  • Now we retrieve the "owner" field of product.
  • Therefore, we can compare it to the uploader of raw images, and say if a main image is locked.

Fixes bug(s)

Part of

Impacted files

  • api_get_product_test.dart: new test "check if images are locked"
  • product.dart: added field owner and methods around images - isImageLocked, getLocalizedImage and getRawImage
  • product.g.dart: generated
  • product_fields.dart: added field OWNER

Impacted files:
* `api_get_product_test.dart`: new test "check if images are locked"
* `product.dart`: added field `owner` and methods around images - `isImageLocked`, `getLocalizedImage` and `getRawImage`
* `product.g.dart`: generated
* `product_fields.dart`: added field `OWNER`
Copy link
Contributor

@g123k g123k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems OK 👌

@monsieurtanuki monsieurtanuki merged commit 8a01b5c into openfoodfacts:master Nov 25, 2024
3 of 4 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @g123k for your review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Add product "owner" field and bool method "isImageLocked"
3 participants