From 6d499aee570396914f8e803eb760ed5481ac0c06 Mon Sep 17 00:00:00 2001 From: monsieurtanuki Date: Thu, 7 Sep 2023 16:34:12 +0200 Subject: [PATCH 1/2] feat: specified minimum size for uploaded images (for pre-checks) Impacted file: * `image_helper.dart`: specified minimum size for uploaded images --- lib/src/utils/image_helper.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/src/utils/image_helper.dart b/lib/src/utils/image_helper.dart index 24582770b9..51dd06f221 100644 --- a/lib/src/utils/image_helper.dart +++ b/lib/src/utils/image_helper.dart @@ -5,6 +5,12 @@ import '../model/product_image.dart'; /// Helper class related to product pictures class ImageHelper { + /// Minimum accepted width for an uploaded image. + static const int minimumWidth = 640; + + /// Minimum accepted height· for an uploaded image. + static const int minimumHeight = 160; + /// Returns the [image] full url - for a specific [imageSize] if needed. /// /// Returns null is [barcode] is null. From fe400594a82d9524735b068a2a10907682814bb0 Mon Sep 17 00:00:00 2001 From: monsieurtanuki Date: Thu, 7 Sep 2023 16:36:50 +0200 Subject: [PATCH 2/2] Update lib/src/utils/image_helper.dart --- lib/src/utils/image_helper.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/utils/image_helper.dart b/lib/src/utils/image_helper.dart index 51dd06f221..65e9c0b748 100644 --- a/lib/src/utils/image_helper.dart +++ b/lib/src/utils/image_helper.dart @@ -8,7 +8,7 @@ class ImageHelper { /// Minimum accepted width for an uploaded image. static const int minimumWidth = 640; - /// Minimum accepted height· for an uploaded image. + /// Minimum accepted height for an uploaded image. static const int minimumHeight = 160; /// Returns the [image] full url - for a specific [imageSize] if needed.