PassBarcode.fromJson constructor
Implementation
factory PassBarcode.fromJson(Map<String, Object?> json) {
final messageEncoding =
supportedCodecs[(json['messageEncoding'] as String).toLowerCase()]!;
return PassBarcode(
format: _allowedFormats[json['format']]!,
barcodeData:
Uint8List.fromList(messageEncoding.encode(json['message'] as String)),
messageEncoding: messageEncoding,
altText: json['altText'] as String?,
);
}