2026-04-09 21:32:23 +08:00

38 lines
847 B
Dart

class SCMusicMode {
SCMusicMode({String? title, String? artist,int? duration,String? localPath}) {
_title = title;
_artist = artist;
_duration = duration;
_localPath = localPath;
}
String? _title;
String? _artist;
int? _duration;
String? _localPath;
String? get title => _title;
String? get artist => _artist;
int? get duration => _duration;
String? get localPath => _localPath;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['title'] = _title;
map['artist'] = _artist;
map['duration'] = _duration;
map['localPath'] = _localPath;
return map;
}
SCMusicMode.fromJson(dynamic json) {
_title = json['title'];
_artist = json['artist'];
_duration = json['duration'];
_localPath = json['localPath'];
}
}