findDevices method

  1. @override
Stream<FoundDevice> findDevices(
  1. Set<UrpDeviceType> readerTypes
)

Will return a stream of FoundDevices that match the readerTypes provided. Will wait 1 second before starting to emit the readers. Will wait 300 milliseconds between emitting each reader.

Implementation

@override
Stream<FoundDevice> findDevices(Set<UrpDeviceType> readerTypes) async* {
  await delay(Duration(seconds: 1));

  for (var reader in _virtualReaders) {
    if (readerTypes.contains(reader.type)) {
      await delay(Duration(milliseconds: 300));
      yield reader;
    }
  }

  await delay(Duration(seconds: 3));
}