import 'package:json_annotation/json_annotation.dart'; import 'package:ocarina/api/subsonic/artist.dart'; part 'artistindex.g.dart'; /// List of artist under a certain index (first letter of their name) /// /// As returned by `getIndexes` @JsonSerializable() class ArtistIndex { /// Creates instance from the JSON response returned by `getIndexes` factory ArtistIndex.fromJson(Map json) => _$ArtistIndexFromJson(json); ArtistIndex({required this.index, required this.artists}); Map toJson() => _$ArtistIndexToJson(this); /// The index /// /// `#` for unknown character @JsonKey(name: "name") final String index; /// List of artists under this index @JsonKey(name: "artist") final List artists; }