fix: support utf-16 encoding

Signed-off-by: The one with the braid <info@braid.business>
This commit is contained in:
The one with the braid 2025-04-04 09:22:32 +02:00
parent c1d9fa2db3
commit 0b52723667
No known key found for this signature in database
GPG key ID: 79D2235BC19FF56A
4 changed files with 20 additions and 22 deletions

View file

@ -81,7 +81,7 @@ class PassBarcode {
return PassBarcode(
format: _allowedFormats[json['format']]!,
barcodeData:
Uint8List.fromList(messageEncoding.encode(json['message'] as String)),
Uint8List.fromList(messageEncoding.encode((json['message'] as String).replaceAll('\\', '\\\\'))),
messageEncoding: messageEncoding,
altText: json['altText'] as String?,
);