mirror of
https://gitlab.com/TheOneWithTheBraid/dart_pkpass.git
synced 2025-07-06 05:18:47 +00:00
fix: support utf-16 encoding
This commit is contained in:
parent
c1d9fa2db3
commit
6bd3ff3ad9
5 changed files with 27 additions and 24 deletions
|
@ -80,8 +80,10 @@ class PassBarcode {
|
|||
supportedCodecs[(json['messageEncoding'] as String).toLowerCase()]!;
|
||||
return PassBarcode(
|
||||
format: _allowedFormats[json['format']]!,
|
||||
barcodeData:
|
||||
Uint8List.fromList(messageEncoding.encode(json['message'] as String)),
|
||||
barcodeData: Uint8List.fromList(
|
||||
messageEncoding
|
||||
.encode((json['message'] as String).replaceAll('\\', '\\\\')),
|
||||
),
|
||||
messageEncoding: messageEncoding,
|
||||
altText: json['altText'] as String?,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue