startAndroidBroadcasts method

  1. @override
Future<void> startAndroidBroadcasts({
  1. required List<AndroidScannerBroadcastPreset> presets,
  2. bool configureChainwayBroadcastOutput = true,
  3. bool showLogs = false,
})
override

Starts the native Android receiver with the supplied presets.

Throws MissingPluginException on the web, which HardwareScannerController reports as platformUnavailable.

Implementation

@override
Future<void> startAndroidBroadcasts({
  required List<AndroidScannerBroadcastPreset> presets,
  bool configureChainwayBroadcastOutput = true,
  bool showLogs = false,
}) async {
  _throwIfWeb('startBroadcasts');

  await methodChannel.invokeMethod<void>('startBroadcasts', <String, Object?>{
    'presets': presets.map((preset) => preset.toMap()).toList(),
    'configureChainwayBroadcastOutput': configureChainwayBroadcastOutput,
    'showLogs': showLogs,
  });
}