20 Commits

Author SHA1 Message Date
692610cf6f Bump to flutter_lints 6.0.0 (#6713) 2025-07-06 12:01:44 +02:00
e3bc40fdf3 chore: Migration to Dart 3.8 (#6668)
* Migration to Dart 3.8

* New GA

* Fix dartdoc
2025-06-23 18:14:17 +02:00
e37d5698db 3 variants (#6163) 2025-01-10 11:29:44 +01:00
43d282a241 fix: 5 bugfixes (icons color, better network mgmt / Japanese…) (#6127)
* Fix the elevated button color

* Scan tagline : when there is an error, hide the image

* Better management of errors for the `ProductPicture`

* Force a loader for the gallery

* Fix Japanese issue with tables

* Update packages/smooth_app/lib/cards/product_cards/smooth_product_image.dart

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>

* Force a color for Price buttons

---------

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2025-01-06 08:52:08 +01:00
85c13502d2 Migration to Flutter 3.27 (#6076)
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
2024-12-29 15:20:05 +01:00
7045e2ce6f Add a loading state to the tagline image (#5832) 2024-11-11 09:42:25 +01:00
3c8c299d28 fix: Invisible loading animation (#5641) 2024-09-30 09:13:10 +02:00
1c4b95954e fix: Fix performances on the photos gallery (#5447)
* Improve performances for the photos gallery

* Allow to pass an `ImageSize` to `ProductImageWidget`

* Update packages/smooth_app/lib/pages/image/product_image_gallery_other_view.dart

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>

---------

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2024-06-28 09:07:12 +02:00
1922d39f07 feat: 5128 - visible dates on raw image grid items (#5144)
Impacted files:
* `product_image_gallery_other_view.dart`: display the upload date on top of raw image grid items
* `product_image_gallery_view.dart`: unrelated minor refactoring
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgrade to off-dart 3.5.0 in order to get the uploaded timestamp of raw images
* `smooth_image.dart`: unrelated minor refactoring
2024-04-08 13:01:13 +02:00
f81ba98ec1 feat: Use the Slivers mechanism with the Gallery view (#4913)
* Use the Slivers mechanism with the Gallery view

* Remove the print from the demo

* Also remove keep alives

* Ok, here is your format thing

* Remove Provider
2023-12-16 12:06:17 +01:00
1bae9408f1 Image placeholder now works again + a different animation (#4385) 2023-07-28 08:14:12 +02:00
4c0d0a4ef6 feat: Add an always visible placeholder + error builder for Images (#4339) 2023-07-21 01:46:53 +02:00
ff1a20b074 Provide a Hero animation between the list of photos and the viewer (#4141) 2023-06-14 14:58:21 +02:00
558034fb6f feat: 3897 - mutilingual gallery and swipeable images - read only (#3917)
New file:
* `image_field_extension.dart`: moved code from `product_cards_helper.dart`

Deleted files:
* `product_image_unswipeable_view.dart`
* `smooth_images_sliver_list.dart`
* `smooth_images_view.dart`

Impacted files:
* `image_upload_card.dart`: minor refactoring
* `language_selector.dart`: added an optional foreground color (use case: explicit white for images on a black background)
* `new_crop_page.dart`: minor refactoring
* `nutrition_page_loaded.dart: now using a new special case constructor of `ProductImageSwipeableView` instead of now deleted `ProductImageUnswipeableView`
* `product_cards_helper.dart`: added language-related methods; refactored
* `product_image_carousel.dart`: minor refactoring
* `product_image_data.dart`: added language
* `product_image_gallery_view.dart`: simplified the display of the 4 images; added the language selector on top; refactored the title
* `product_image_swipeable_view.dart`: now handles the "mono imagefield" case; now manages languages; minor refactoring
* `product_image_viewer.dart`: added the language selector; removed the irrelevant `Scaffold`
2023-04-29 13:56:36 +02:00
ad7ac7732a refactor: Flutter v3.7.0 (#3642) 2023-01-31 22:39:07 +01:00
7121b0e78e feat: 2424 - new "select existing images" button (#3641)
* feat: 2424 - new "select existing image" button

New files:
* `background_task_crop.dart`: Background task about product image crop from existing file.
* `uploaded_image_gallery.dart`: Gallery of all images already uploaded, about a given product.

Delete file:
* `smooth_images_sliver_grid.dart`

Impacted files:
* `abstract_background_task.dart`: added reference to "crop" task
* `app_en.arb`: added 4 labels about "existing images" (button, page title, downloading, nothing found)
* `image_crop_page.dart`: refactored moving code here from `ProductImageViewer`
* `new_crop_page.dart`: now we can handle "already existing" images, in addition to the current choice for e.g. NUTRITION_FR
* `operation_type.dart`: added reference to new "crop" task
* `product_image_swipeable_view.dart`: unrelated fix - the title of the first reached page was always the title of the first page to the left
* `product_image_viewer.dart`: added a "select existing image" button; moved code to `image_crop_page.dart`
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded off-dart in order to user new methods

* feat: 2424 - upgraded to off-dart 2.2.0

Impacted files:
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded off-dart in order to user new methods
2023-01-27 06:36:08 +01:00
8831337a21 feat: 3332 - crop page title now reflects image field (#3366)
* feat: 3332 - crop page title now reflects image field

Impacted files:
* `confirm_and_upload_picture.dart`: minor refactoring
* `crop_helper.dart`: added a `pageTitle` parameter
* `edit_ingredients_page.dart`: minor refactoring
* `image_crop_page.dart`: added `imageField` parameters, so that we can compute the correct label on crop page
* `image_upload_card.dart`: now we explicitly use `getProductImageButtonText` as label
* `new_crop_page.dart`: added a page title parameter
* `product_cards_helper.dart`: new label method `getImagePageTitle`; minor refactoring
* `product_image_carousel.dart`: minor refactoring
* `product_image_data.dart`: removed label fields - now we have more flexibility, computing labels from `imageField` with `product_cards_helper.dart` methods
* `product_image_gallery_view.dart`: minor refactoring
* `product_image_swipeable_view.dart`: now we explicitly use `getImagePageTitle` as label
* `product_image_viewer.dart`: minor refactoring
* `smooth_images_sliver_list.dart`: now we explicitly use `getProductImageTitle` as label
* `smooth_product_image.dart`: minor refactoring

* feat: 3332 - 2 lines for the title

Impacted files:
* `new_crop_page.dart`: 2 lines for the title

Co-authored-by: Aman Raj <57723319+AshAman999@users.noreply.github.com>
2022-11-28 20:39:22 +01:00
bc91d43327 feat: 3129 (New PR) Allow to swipe between product images on the full screen image (#3363)
* feat : 3129 (New PR) Allow to swipe between product images on the full screen image

* Resolved formatting issues

* Made the changes suggested in PR review

* Resolved formatting issues

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2022-11-27 10:10:22 +01:00
41bbf32c66 refactor: ProductImageData to contain all image links (#3088)
* refactor: ProductImageData to contain all image links

* Revert "refactor: ProductImageData to contain all image links"

This reverts commit 1a02022f562ef5069827007bb9025e10d8612639.

* refactor: ProductImageData imageUrl to ImageDescriptor

* refactor: Move _getProductImageData() to factory method

* refactor: Revert part of ImageDescriptor changes

* feat: ProductImageData getImageUrl

* fix: Gallery product image quality

* draft: Fallback is full image doesn't exist

* revert: Partial revert of fallback draft

* feat: Show error when image edit fails

* fix: Fallback to other image qualities

* fix: Remove other image sizes?
2022-10-12 19:19:09 +02:00
c70683939d feat: Add a gallery of the images selected and uploaded for a product (#2801)
* feat: image list gallery
* feat: display every image in gallery view
* feat: shimmering effect in `smooth_list_view.dart`
* docs: add documentation to `product_image_gallery_view.dart`
* refactor: extract SmoothBackButton

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2022-09-04 19:33:29 +02:00