TrackedBarcode.fromJSON constructor
TrackedBarcode.fromJSON(
- Map<String, dynamic> json, {
- int? sessionFrameSequenceId,
})
Implementation
factory TrackedBarcode.fromJSON(Map<String, dynamic> json, {int? sessionFrameSequenceId}) {
var barcode = Barcode.fromJSON(json['barcode']);
var location = Quadrilateral.fromJSON(json['location']);
var identifier = int.parse(json['identifier'] as String);
var shouldAnimateFromPreviousToNextState = false;
if (json.containsKey('shouldAnimateFromPreviousToNextState')) {
shouldAnimateFromPreviousToNextState = json['shouldAnimateFromPreviousToNextState'] as bool;
}
return TrackedBarcode._(barcode, location, identifier, sessionFrameSequenceId,
shouldAnimateFromPreviousToNextState: shouldAnimateFromPreviousToNextState);
}