-
-
Notifications
You must be signed in to change notification settings - Fork 287
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: #1177 - new camera image getter with cropping feature #1184
feat: #1177 - new camera image getter with cropping feature #1184
Conversation
New files: * `abstract_camera_image_getter.dart`: Abstract getter of Camera Image, for barcode scan. * `camera_image_cropper.dart`: Camera Image Cropper, in order to limit the barcode scan computations. * `camera_image_full_getter.dart`: Camera Image helper where we get the full image. Impacted file: * `ml_kit_scan_page.dart`: now using new `CameraImageFullGetter` class - same full screen camera image capture as before for the moment.
Impacted files: * `ml_kit_scan_page.dart`: added optional scan / no scan options according to dev mode * `user_preferences.dart`: added methods for dev mode int values * `user_preferences_dev_mode.dart`: added a "scan mode" option on dev mode
@M123-dev ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks @monsieurtanuki
I can't say if there is a problem in the calculation part but it looks about right, now we have to test
); | ||
} | ||
|
||
@protected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://api.flutter.dev/flutter/meta/protected-constant.html
Used to annotate an instance member in a class or mixin which is meant to be visible only within the declaring library, and to other instance members of the class or mixin, and their subtypes.
Looks to me like it's only usefull for libraries on pub.dev not for something private, but I could be wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -39,6 +39,7 @@ class UserPreferencesDevMode extends AbstractUserPreferences { | |||
static const String userPreferencesFlagLenientMatching = '__lenientMatching'; | |||
static const String userPreferencesFlagAdditionalButton = | |||
'__additionalButtonOnProductPage'; | |||
static const String userPreferencesEnumScanMode = '__scanMode'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe to confuse with userPreferencesFlagUseMLKit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed the confusion is possible: we're talking about scan parameters in both cases.
But I don't see how I could make it less confusing, and anyway it's the dev mode: things are not supposed to stay here forever.
@M123-dev Thank you for your review! |
New files:
abstract_camera_image_getter.dart
: Abstract getter of Camera Image, for barcode scan.camera_image_cropper.dart
: Camera Image Cropper, in order to limit the barcode scan computations.camera_image_full_getter.dart
: Camera Image helper where we get the full image.Impacted file:
ml_kit_scan_page.dart
: now using newCameraImageFullGetter
class - same full screen camera image capture as before for the moment.What
Part of