convertFromMap static method

QrScannerConfig convertFromMap(
  1. Map<String, dynamic> map
)

Implementation

static QrScannerConfig convertFromMap(Map<String, dynamic> map) {
  var shouldCloseAfterSuccessfulScan =
      (map["shouldCloseAfterSuccessfulScan"] is bool)
          ? map["shouldCloseAfterSuccessfulScan"]
          : map["shouldCloseAfterSuccessfulScan"] == 1;
  return QrScannerConfig(
    shouldCloseAfterSuccessfulScan: shouldCloseAfterSuccessfulScan,
  );
}