start method

Future<bool?> start({
  1. Function? onRecognitionError,
})

Start recognition. Use onResult and onPartial to get recognition results.

Implementation

Future<bool?> start({final Function? onRecognitionError}) {
  _errorStreamSubscription ??= EventChannel(
    'error_event_channel',
    const StandardMethodCodec(),
    _channel.binaryMessenger,
  ).receiveBroadcastStream().listen(null, onError: onRecognitionError);

  return _channel.invokeMethod<bool>('speechService.start');
}