recognizeUnistroke<K extends DefaultUnistrokeNames> function

RecognizedUnistroke? recognizeUnistroke<K extends DefaultUnistrokeNames>(
  1. List<Offset> inputPoints, {
  2. bool useProtractor = true,
  3. List<Unistroke<K>>? overrideReferenceUnistrokes,
})

Recognizes a unistroke from inputPoints.

If useProtractor is true, the Protractor algorithm is used. Otherwise, the Golden Section Search algorithm is used. The Protractor algorithm is the newer algorithm and is faster.

Returns null if no unistroke could be recognized, otherwise returns a RecognizedUnistroke with the recognized unistroke name and the score.

You can set referenceUnistrokes to a list of your own unistroke templates if you want to recognize a different set of unistrokes. Alternatively, you can set overrideReferenceUnistrokes to override referenceUnistrokes for this call only. If you change referenceUnistrokes or overrideReferenceUnistrokes, you should call recognizeCustomUnistroke instead of this function.

Implementation

RecognizedUnistroke? recognizeUnistroke<K extends DefaultUnistrokeNames>(
  List<Offset> inputPoints, {
  bool useProtractor = true,
  List<Unistroke<K>>? overrideReferenceUnistrokes,
}) {
  return recognizeCustomUnistroke<K>(
    inputPoints,
    useProtractor: useProtractor,
    overrideReferenceUnistrokes: overrideReferenceUnistrokes,
  );
}