From 188601c5dbe070644379437ab83547ce3f7a2fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20R=C4=99bacz?= Date: Mon, 19 Jul 2021 14:47:38 +0200 Subject: [PATCH] Fix Track JSON deserialization (#125) * Update track.dart * Update track.g.dart --- lib/models/track.dart | 2 +- lib/models/track.g.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/models/track.dart b/lib/models/track.dart index dd58a44f..8a55af9e 100644 --- a/lib/models/track.dart +++ b/lib/models/track.dart @@ -35,7 +35,7 @@ class Track { final String name; final String uri; @JsonKey(name: 'linked_from_uri') - final String linkedFromUri; + final String? linkedFromUri; factory Track.fromJson(Map json) => _$TrackFromJson(json); diff --git a/lib/models/track.g.dart b/lib/models/track.g.dart index 83930ca1..c57adacf 100644 --- a/lib/models/track.g.dart +++ b/lib/models/track.g.dart @@ -17,7 +17,7 @@ Track _$TrackFromJson(Map json) { ImageUri.fromJson(json['image_id'] as Map), json['name'] as String, json['uri'] as String, - json['linked_from_uri'] as String, + json['linked_from_uri'] as String?, isEpisode: json['is_episode'] as bool, isPodcast: json['is_podcast'] as bool, );