MethodChannelOcr class

An implementation of OcrPlatform that uses method channels.

Inheritance

Constructors

MethodChannelOcr()

Properties

hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
The method channel used to interact with the native platform.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

closeCamera() Future<bool>
override
cropImage(String sourcePath) Future<String?>
Launch native image cropper for the given image path. Returns the cropped image path.
override
getOcrText() Future<String?>
Get the latest OCR recognized text (newline-separated lines).
override
getPlatformVersion() Future<String?>
override
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.
override
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.
override
openCamera(int facing) Future<bool>
override
setPhotoMode(bool isPhoto) Future<bool?>
override
setTargetRect(double w, double h) Future<bool?>
override
takePhoto(String savePath) Future<String?>
Take a photo and save to the specified path. Returns the saved file path.
override
toggleFlash() Future<bool>
Toggle camera flash/torch on/off.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited