Spotify.fromJson constructor

Spotify.fromJson(
  1. Map<String, dynamic> json
)

Implementation

Spotify.fromJson(Map<String, dynamic> json) {
  album = json['album'] != null ? SpotifyAlbum.fromJson(json['album']) : null;
  if (json['artists'] != null) {
    artists = <SpotifyArtists>[];
    json['artists'].forEach((v) {
      artists?.add(SpotifyArtists.fromJson(v));
    });
  }
  track = json['track'] != null ? Track.fromJson(json['track']) : null;
}