FfiPaddleOcr class
PaddleOcrPlatform 的唯一实现:FFI(dart:ffi)直连原生库。
识别链路没有任何回退 —— MethodChannel 传输整图字节的序列化开销 不可接受,也不再保留降级桩。原生库加载失败时错误会直接抛给调用方, 便于第一时间暴露部署问题(缺 DLL / so、架构不匹配等)。
- Inheritance
-
- Object
- PlatformInterface
- PaddleOcrPlatform
- FfiPaddleOcr
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
-
clearDefaultOptions(
) → void -
清除引擎级默认选项,回到标准单分支行为。
override
-
dispose(
) → void - 释放引擎并清理原生资源。
-
getPlatformVersion(
) → Future< String?> -
获取平台版本字符串。
override
-
initialize(
{required String detModelPath, required String recModelPath, required String dictPath}) → Future< bool> -
使用模型路径初始化 OCR 引擎。
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pickImage(
) → Future< String?> -
打开文件选择对话框以选择图片,返回所选文件路径。
override
-
recognizeImage(
String imagePath, {OcrOptions? options}) → Future< List< OcrResult> > -
从图片文件路径识别文字。
override
-
recognizeImageBytes(
Uint8List imageBytes, {OcrOptions? options}) → Future< List< OcrResult> > -
从图片字节数据识别文字。
override
-
runPipeline(
Uint8List imageBytes, List< OcrPreprocessor> preprocessors, {OcrOptions? options}) → Future<List< OcrResult> > -
用宿主注入的预处理变体跑编排管线(插件接口)。
override
-
setDefaultOptions(
OcrOptions options) → Future< bool> -
把选项设为引擎级默认。
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited