BarcodeSelectionConfiguration.fromJson constructor
BarcodeSelectionConfiguration.fromJson(
- Map<String, dynamic> json
)
Implementation
factory BarcodeSelectionConfiguration.fromJson(Map<String, dynamic> json) =>
BarcodeSelectionConfiguration(
selectionMethod: json.containsKey("selectionMethod")
? BarcodeSelectionMethod.values
.byName(json["selectionMethod"] as String)
: BarcodeSelectionMethod.ALL,
centerCoordX: json.containsKey("centerCoordX")
? (json["centerCoordX"] as num).toDouble()
: 0.5,
centerCoordY: json.containsKey("centerCoordY")
? (json["centerCoordY"] as num).toDouble()
: 0.5,
centerDistanceTolerance: json.containsKey("centerDistanceTolerance")
? (json["centerDistanceTolerance"] as num).toDouble()
: 0.0,
);