OnModelFormatter extension

Used to convert a List<dynamic> into a Model.

ModelTypes:

Usage:

  • This method can be used any time, but it's more required when using queryWithFilters. This method will return a List<dynamic> and to make life easy you can use this method to convert into any model.
on

Methods

toAlbumModel() List<AlbumModel>
Used to convert a List dynamic into a List AlbumModel.
toArtistModel() List<ArtistModel>
Used to convert a List dynamic into a List ArtistModel.
toGenreModel() List<GenreModel>
Used to convert a List dynamic into a List GenreModel.
toPlaylistModel() List<PlaylistModel>
Used to convert a List dynamic into a List PlaylistModel.
toSongModel() List<SongModel>
Used to convert a List dynamic into a List SongModel.