updateSettings method

Future<void> updateSettings(
  1. int formats
)

Initialize runtime settings.

Implementation

Future<void> updateSettings(int formats) async {
  dynamic settings =
      await handleThenable(_barcodeReader!.getRuntimeSettings());
  Map obj = json.decode(stringify(settings));
  obj['barcodeFormatIds'] = formats;
  await handleThenable(
      _barcodeReader!.updateRuntimeSettings(json.encode(obj)));
}