UTrackRecord.fromJson constructor

UTrackRecord.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory UTrackRecord.fromJson(Map<String, Object?> json) => UTrackRecord(
  path: (json["p"] as String?) ?? "",
  title: (json["t"] as String?) ?? "",
  artist: (json["a"] as String?) ?? "",
  album: (json["b"] as String?) ?? "",
  albumArtist: json["aa"] as String?,
  genre: json["g"] as String?,
  year: json["y"] as int?,
  trackNumber: json["n"] as int?,
  discNumber: json["d"] as int?,
  durationMs: (json["ms"] as int?) ?? 0,
  sizeBytes: (json["sz"] as int?) ?? 0,
  addedAt: (json["ad"] as int?) ?? 0,
  artworkOffset: (json["ao"] as int?) ?? 0,
  artworkLength: (json["al"] as int?) ?? 0,
  artworkMime: json["am"] as String?,
);