discoverReaders method

  1. @override
Future<void> discoverReaders({
  1. Duration? timeout,
})
override

Begin scanning for nearby readers. Discovered readers are emitted as ReaderEventType.readerDiscovered events on events; a terminal ReaderEventType.discoveryCompleted event marks the end of the scan window.

timeout caps how long the scan runs. If null, the SDK applies a sensible per-platform default.

Implementation

@override
Future<void> discoverReaders({Duration? timeout}) async {
  await _invoke<Object?>(
    MobileReaderChannels.discoverReaders,
    <String, dynamic>{
      if (timeout != null)
        MobileReaderChannels.argTimeoutMs: timeout.inMilliseconds,
    },
  );
}