BarcodeUseCase.fromJson constructor
BarcodeUseCase.fromJson(
- Map<String, dynamic> json
)
Implementation
factory BarcodeUseCase.fromJson(Map<String, dynamic> json) {
String _type = json["_type"];
switch (_type) {
case "SingleScanningMode":
return SingleScanningMode.fromJson(json);
case "MultipleScanningMode":
return MultipleScanningMode.fromJson(json);
case "FindAndPickScanningMode":
return FindAndPickScanningMode.fromJson(json);
default:
throw ArgumentError("Invalid polymorphic type: $_type");
}
}