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
This commit is contained in:
ptrcnull 2024-05-30 15:28:38 +02:00
parent b702cc940d
commit 325ee81d1f

View file

@ -121,7 +121,7 @@ class DictionaryField {
factory DictionaryField.fromJson(Map<String, Object?> 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),