OcrHelper class abstract
OCR Helper, to be implemented for ingredients and packaging for instance.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getActionExtractingData(
AppLocalizations appLocalizations) → String - Returns the "Extracting data…" button label
-
getActionExtractShortText(
AppLocalizations appLocalizations) → String - Returns the "extract text" button label (short version)
-
getActionExtractText(
AppLocalizations appLocalizations) → String - Returns the "extract text" button label
-
getActionLoadingPhoto(
AppLocalizations appLocalizations) → String - Returns the "loading photo" button label
-
getActionLoadingPhotoDialogBody(
AppLocalizations appLocalizations) → String - Returns the content of the dialog to explain the "loading photo" state
-
getActionLoadingPhotoDialogTitle(
AppLocalizations appLocalizations) → String - Returns the title of the dialog to explain the "loading photo" state
-
getActionRefreshPhoto(
AppLocalizations appLocalizations) → String - Returns the "refresh photo" button label
-
getAddButtonLabel(
AppLocalizations appLocalizations) → String - Returns the label of the corresponding "add" button.
-
getEditableContentTitle(
AppLocalizations appLocalizations) → String - Eg: list of ingredients, packaging, etc.
-
getEditEventAnalyticsTag(
) → AnalyticsEditEvents - Returns the enum to be used for matomo analytics.
-
getError(
AppLocalizations appLocalizations) → String - Returns the error when the server product refresh failed.
-
getExtractedText(
Product product, OpenFoodFactsLanguage language) → Future< String?> - Returns the text that the server OCR managed to extract from the image.
-
getIcon(
) → WidgetBuilder - Returns the icon to be displayed in the edit page.
-
getImageError(
AppLocalizations appLocalizations) → String - Returns the error to display when the image upload + OCR failed.
-
getImageField(
) → ImageField - Returns the image field we try to run OCR on.
-
getImageUrl(
Product product) → String? -
Returns the image url of this field for this
product. -
getInstructions(
AppLocalizations appLocalizations) → String - Returns instructions about the text input.
-
getLanguage(
) → OpenFoodFactsLanguage -
getMonolingualText(
Product product) → String? -
getMultilingualTexts(
Product product) → Map< OpenFoodFactsLanguage, String> ? -
getPhotoTitle(
AppLocalizations appLocalizations) → String - Eg: Ingredients photo, packaging photo, etc.
-
getStamp(
) → BackgroundTaskDetailsStamp - Stamp to identify similar updates on the same product.
-
getTitle(
AppLocalizations appLocalizations) → String - Returns the page title.
-
getType(
AppLocalizations appLocalizations) → String - Returns the type of the field (eg: ingredients).
-
getUser(
) → User -
hasAddExtraPhotoButton(
) → bool - Returns true if we need to put an "add extra photos" button.
-
isOwnerField(
Product product, OpenFoodFactsLanguage language) → bool - Returns if a given product has an owner field (= value provided by the producer).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setMonolingualText(
Product product, String text) → void -
setMultilingualTexts(
Product product, Map< OpenFoodFactsLanguage, String> texts) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited