OcrPlatform class abstract
- Inheritance
-
- Object
- PlatformInterface
- OcrPlatform
- Implementers
Constructors
- OcrPlatform()
- Constructs a OcrPlatform.
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
-
closeCamera(
) → Future< bool> -
cropImage(
String sourcePath) → Future< String?> - Launch native image cropper for the given image path. Returns the cropped image path.
-
getOcrText(
) → Future< String?> - Get the latest OCR recognized text (newline-separated lines).
-
getPlatformVersion(
) → Future< String?> -
loadModel(
{required String detParam, required String detModel, required String recParam, required String recModel, int sizeid = 0, int cpugpu = 0}) → Future< bool> - Load OCR model from file paths.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
ocrFromImage(
String imagePath) → Future< String?> - Run OCR on a static image file. Returns recognized text.
-
openCamera(
int facing) → Future< bool> -
setPhotoMode(
bool isPhoto) → Future< bool?> -
setTargetRect(
double w, double h) → Future< bool?> -
takePhoto(
String savePath) → Future< String?> - Take a photo and save to the specified path. Returns the saved file path.
-
toggleFlash(
) → Future< bool> - Toggle camera flash/torch on/off.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ OcrPlatform
-
The default instance of OcrPlatform to use.
getter/setter pair