summaryrefslogtreecommitdiff
path: root/lib/models/artist.dart
blob: 70c17db99f3bbac85ece3ab830bd277848b5e285 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class Artist {
  final String type;
  final String name;
  final String typeId;
  final String sortName;
  final String disambiguation;
  final String id;

  const Artist({
    required this.type,
    required this.name,
    required this.typeId,
    required this.sortName,
    required this.disambiguation,
    required this.id,
  });

  factory Artist.fromMap(Map<String, dynamic> map) {
    return Artist(
      type: map["type"],
      name: map["name"],
      typeId: map["type-id"],
      sortName: map["sort-name"],
      disambiguation: map["disambiguation"],
      id: map["id"],
    );
  }
}