startScan method

Future<Stream<Barcode>> startScan(
  1. RecognitionType type,
  2. int delay
)

Start recognition objects of type RecognitionType

type - RecognitionType, plugin will use MlKit API for this type. delay - delay in milliseconds between detection for decreasing CPU consumption. Detection happens every delay milliseconds, skipping frames during delay Can throw PlatformException if camera is not initialized.

Implementation

Future<Stream<Barcode>> startScan(RecognitionType type, int delay) async {
  final args = {
    'type': type.rawValue,
    'delay': delay,
  };
  await _channel.invokeMethod(_startScanMethod, args);
  return _scanResultStreamController.stream;
}