PaddleOcrPlatform class abstract
pp_ocr 插件的平台接口。
默认实现使用 FFI(dart:ffi)直接调用原生库。 当 FFI 不可用时(例如找不到 DLL),会自动回退到 MethodChannel。
- Inheritance
-
- Object
- PlatformInterface
- PaddleOcrPlatform
- 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
-
getPlatformVersion(
) → Future< String?> - 获取平台版本字符串。
-
initialize(
{required String detModelPath, required String recModelPath, required String dictPath}) → Future< bool> - 使用模型路径初始化 OCR 引擎。
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pickImage(
) → Future< String?> - 打开文件选择对话框以选择图片,返回所选文件路径。
-
recognizeImage(
String imagePath) → Future< List< OcrResult> > - 从图片文件路径识别文字。
-
recognizeImageBytes(
Uint8List imageBytes) → Future< List< OcrResult> > - 从图片字节数据识别文字。
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ PaddleOcrPlatform
-
获取当前平台接口实例。
getter/setter pair