Dart 播放器插件陈旧坑

Song.class 缺少属性导致启动失败

flute_music_player 0.0.6 版本

需要修改库文件

修正的 class 缺少的属性


class Song {

static final Columns=["id","artist", "title", "album", "albumId", "duration", "uri", "albumArt","count","isFav","timestamp"];

int id;
String artist;
String title;
String album;
int albumId;
int duration;
String uri;
String albumArt;
int count;
int timestamp;
int isFav;

Song(this.id, this.artist, this.title, this.album, this.albumId,
this.duration, this.uri, this.albumArt);

Song.fromMap(Map m) {
id = m["id"];
artist = m["artist"];
title = m["title"];
album = m["album"];
albumId = m["albumId"];
duration = m["duration"];
uri = m["uri"];
albumArt = m["albumArt"];
}

Map<String, dynamic> toMap() {
Map params = <String, dynamic>{
"id": id,
"artist": artist,
"title": title,
"album": album,
"albumId": albumId,
"duration": duration,
"uri": uri,
"albumArt": albumArt,
"count": count,
"timestamp": timestamp,
"isFav": isFav,
};

return params;
}

}