From 349271cbaf0a4c505836fc18a127052da8e38429 Mon Sep 17 00:00:00 2001 From: Ryan Heise Date: Fri, 21 Aug 2020 12:38:24 +1000 Subject: [PATCH] Fix IcyMetadata decoding. --- example/pubspec.lock | 2 +- lib/just_audio.dart | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index d65101b..c87fe68 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -106,7 +106,7 @@ packages: path: ".." relative: true source: path - version: "0.3.2" + version: "0.3.3" matcher: dependency: transitive description: diff --git a/lib/just_audio.dart b/lib/just_audio.dart index e33b446..0f994f2 100644 --- a/lib/just_audio.dart +++ b/lib/just_audio.dart @@ -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;