TargetBarcode.fromJSON constructor

TargetBarcode.fromJSON(
  1. Map<String, dynamic> json
)

Implementation

factory TargetBarcode.fromJSON(Map<String, dynamic> json) {
  var data = json['data'] as String;
  var quantity = (json['quantity'] as num).toInt();
  return TargetBarcode.create(data, quantity);
}