BarcodeAccumulationConfiguration.fromJson constructor

BarcodeAccumulationConfiguration.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory BarcodeAccumulationConfiguration.fromJson(
        Map<String, dynamic> json) =>
    BarcodeAccumulationConfiguration(
      minConfirmationsStandaloneEAN:
          json.containsKey("minConfirmationsStandaloneEAN")
              ? (json["minConfirmationsStandaloneEAN"] as int)
              : 1,
      accumulationTime: json.containsKey("accumulationTime")
          ? (json["accumulationTime"] as int)
          : 500,
      removeUnconnectedResults: json.containsKey("removeUnconnectedResults")
          ? (json["removeUnconnectedResults"] as bool)
          : true,
      method: json.containsKey("method")
          ? BarcodeAccumulationMethod.values.byName(json["method"] as String)
          : BarcodeAccumulationMethod.INTERPOLATE_BY_CAMERA,
    );