SongModel class

Represents an audio file (song) on the device.

Constructors

SongModel({required int id, required String title, String? artist, String? album, int? albumId, int? artistId, String? genre, int? genreId, int? duration, int? size, String? data, String? uri, int? trackNumber, int? discNumber, int? year, int? dateAdded, int? dateModified, String? mimeType, int? bitrate, int? sampleRate, int? channels, String? composer, bool? isFavorite})
const
SongModel.fromMap(Map map)
factory

Properties

album String?
Album name.
final
albumId int?
Album ID.
final
artist String?
Artist name.
final
artistId int?
Artist ID.
final
bitrate int?
Bitrate in bits per second.
final
channels int?
Number of audio channels.
final
composer String?
Composer name.
final
data String?
Absolute path to the audio file.
final
dateAdded int?
Date added to the device (Unix timestamp).
final
dateModified int?
Date modified (Unix timestamp).
final
discNumber int?
Disc number.
final
duration int?
Duration in milliseconds.
final
genre String?
Genre name.
final
genreId int?
Genre ID.
final
hashCode int
The hash code for this object.
no setterinherited
id int
Unique identifier (MediaStore ID on Android, persistent ID on iOS).
final
isFavorite bool?
Whether the song is marked as favorite/liked.
final
mimeType String?
MIME type (e.g. "audio/mpeg").
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sampleRate int?
Sample rate in Hz.
final
size int?
File size in bytes.
final
title String
Display title of the song.
final
trackNumber int?
Track number within the album.
final
uri String?
URI string for the audio file.
final
year int?
Year the song was released.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited