Fix IcyMetadata decoding.

This commit is contained in:
Ryan Heise 2020-08-21 12:38:24 +10:00
parent e60a672722
commit 349271cbaf
2 changed files with 7 additions and 2 deletions

View File

@ -106,7 +106,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.3.2"
version: "0.3.3"
matcher:
dependency: transitive
description:

View File

@ -844,7 +844,12 @@ class IcyMetadata {
IcyMetadata({@required this.info, @required this.headers});
IcyMetadata.fromJson(Map json)
: this(info: json['info'], headers: json['headers']);
: this(
info: json['info'] == null ? null : IcyInfo.fromJson(json['info']),
headers: json['headers'] == null
? null
: IcyHeaders.fromJson(json['headers']),
);
@override
int get hashCode => info.hashCode ^ headers.hashCode;