Closed
Description
waveform: $checkedConvert(json, 'waveform',
(v) => const ByteArrayJsonConverter().fromJson(v as List<int>)),
class ByteArrayJsonConverter implements JsonConverter<Uint8List, List<int>> {
const ByteArrayJsonConverter();
@override
Uint8List fromJson(List<int> json) => Uint8List.fromList(json);
@override
List<int> toJson(Uint8List list) => list == null ? [] : List<int>.from(list);
}
CheckedFromJsonException
Could not create `FullTrack`.
There is a problem with "waveform".
type 'List<dynamic>' is not a subtype of type 'List<int>' in type cast
This is the manual fix:
waveform: $checkedConvert(
json, 'waveform', (v) => const ByteArrayJsonConverter().fromJson((v as List<dynamic>).cast<int>())),