queryFromFolder method
Future<List<SongModel> >
queryFromFolder(
- String path, {
- SongSortType? sortType,
- OrderType? orderType,
- UriType? uriType,
Used to return Songs Info from a specific Folder based in SongModel.
Parameters:
pathis used to define where the plugin will search for audio.orderTypeis used to define if order will be Ascending or Descending.sortTypeis used to define list sort.uriTypeis used to define if songs will be catch inEXTERNALorINTERNALstorage.
Important:
- If
orderTypeis null, will be set toASC_OR_SMALLER. - If
sortTypeis null, will be set totitle. - If
uriTypeis null, will be set toEXTERNAL. - If Android >= Q/10
artworkwill return null, in this case, it's necessary use queryArtwork.
Platforms:
| Android | IOS | Web |
|---|---|---|
✔️ |
❌ |
❌ |
See more about platforms support
Implementation
Future<List<SongModel>> queryFromFolder(
String path, {
SongSortType? sortType,
OrderType? orderType,
UriType? uriType,
}) async {
return platform.queryFromFolder(
path,
sortType: sortType,
orderType: orderType,
uriType: uriType,
);
}