From 325ee81d1f84b513e70c528082d149e7fef1566b Mon Sep 17 00:00:00 2001 From: ptrcnull Date: Thu, 30 May 2024 15:28:38 +0200 Subject: [PATCH] fix: convert field value to String instead of casting sometimes, a silly vendor will make their pass field a number in JSON instead of a string; the iOS Wallet app displays it just fine though --- lib/pkpass/models/pass_structure_dictionary.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pkpass/models/pass_structure_dictionary.dart b/lib/pkpass/models/pass_structure_dictionary.dart index 7b64f42..c995cf4 100644 --- a/lib/pkpass/models/pass_structure_dictionary.dart +++ b/lib/pkpass/models/pass_structure_dictionary.dart @@ -121,7 +121,7 @@ class DictionaryField { factory DictionaryField.fromJson(Map json) => DictionaryField( key: json['key'] as String, - value: DictionaryValue.parse(json['value'] as String), + value: DictionaryValue.parse(json['value'].toString()), attributedValue: json['attributedValue'] == null ? null : DictionaryValue.parse(json['attributedValue'] as String),