google_mlkit_digital_ink_recognition 0.0.1+1
google_mlkit_digital_ink_recognition: ^0.0.1+1 copied to clipboard
A Flutter plugin to use Google's ML Kit Digital Ink Recognition to recognize handwritten text on a digital surface in hundreds of languages, as well as classify sketches.
Google's ML Kit Digital Ink Recognition for Flutter #
A Flutter plugin to use Google's ML Kit Digital Ink Recognition to recognize handwritten text on a digital surface in hundreds of languages, as well as classify sketches.
Getting Started #
Before you get started read about the requirements and known issues of this plugin here.
Usage #
Digital Ink Recognition #
Create an instance of DigitalInkRecognizer
final digitalInkRecognizer = DigitalInkRecognizer();
Process points
List<Offset> points; // an array with the points of the stroke
String modelCode; // BCP-47 Code from https://developers.google.com/ml-kit/vision/digital-ink-recognition/base-models?hl=en#text
final List<RecognitionCandidate> canditates = await digitalInkRecognizer.readText(points, modelCode);
for (final candidate in candidates) {
final text = candidate.text;
final score = candidate.score;
}
Release resources with close()
digitalInkRecognizer.close();
Managing remote models #
Create an instance of model manager
final modelManager = DigitalInkRecognizerModelManager();
Check if model is downloaded
final bool response = await modelManager.isModelDownloaded(model);
Download model
final bool response = await modelManager.downloadModel(model);
Delete model
final bool response = await modelManager.deleteModel(model);
Example app #
Find the example app here.
Contributing #
Contributions are welcome. In case of any problems look at existing issues, if you cannot find anything related to your problem then open an issue. Create an issue before opening a pull request for non trivial fixes. In case of trivial fixes open a pull request directly.