Compare commits
2 commits
2b56776fda
...
017c52f96d
Author | SHA1 | Date | |
---|---|---|---|
017c52f96d | |||
4bc2ad1285 |
3 changed files with 27 additions and 2 deletions
25
.vscode/launch.json
vendored
Normal file
25
.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "ocarina2",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "dart"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ocarina2 (profile mode)",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "dart",
|
||||||
|
"flutterMode": "profile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ocarina2 (release mode)",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "dart",
|
||||||
|
"flutterMode": "release"
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
|
@ -26,7 +26,7 @@ class Album {
|
||||||
@JsonKey(name: "artist")
|
@JsonKey(name: "artist")
|
||||||
final String artistName;
|
final String artistName;
|
||||||
final String artistId;
|
final String artistId;
|
||||||
final int year;
|
final int? year;
|
||||||
final int songCount;
|
final int songCount;
|
||||||
final List<String> genres;
|
final List<String> genres;
|
||||||
final int duration;
|
final int duration;
|
||||||
|
|
|
@ -13,7 +13,7 @@ Album _$AlbumFromJson(Map<String, dynamic> json) => Album(
|
||||||
playCount: (json['playCount'] as num?)?.toInt() ?? 0,
|
playCount: (json['playCount'] as num?)?.toInt() ?? 0,
|
||||||
artistName: json['artist'] as String,
|
artistName: json['artist'] as String,
|
||||||
artistId: json['artistId'] as String,
|
artistId: json['artistId'] as String,
|
||||||
year: (json['year'] as num).toInt(),
|
year: (json['year'] as num?)?.toInt(),
|
||||||
songCount: (json['songCount'] as num).toInt(),
|
songCount: (json['songCount'] as num).toInt(),
|
||||||
genres:
|
genres:
|
||||||
(json['genres'] as List<dynamic>).map((e) => e as String).toList(),
|
(json['genres'] as List<dynamic>).map((e) => e as String).toList(),
|
||||||
|
|
Loading…
Reference in a new issue