recognizeText method
Implementation
@override
Future<String> recognizeText(String imagePath) async {
if (!Platform.isIOS && !Platform.isAndroid) {
throw UnsupportedError(
'FlutterNativeOcr is only available on iOS and Android.');
}
final result = await methodChannel.invokeMethod<String>('recognizeText', {
'imagePath': imagePath,
});
return result ?? '';
}