queryGenres method Null safety

Future<List<GenreModel>> queryGenres(
  1. {GenreSortType? sortType,
  2. OrderType? orderType,
  3. UriType? uriType}

Used to return Genres Info based in GenreModel.


  • orderType is used to define if order will be Ascending or Descending.
  • sortType is used to define list sort.
  • uriType is used to define if songs will be catch in EXTERNAL or INTERNAL storage.


  • If orderType is null, will be set to ASC_OR_SMALLER.
  • If sortType is null, will be set to GenreName.
  • If uriType is null, will be set to EXTERNAL.



See more about platforms support


Future<List<GenreModel>> queryGenres({
  GenreSortType? sortType,
  OrderType? orderType,
  UriType? uriType,
}) async {
  return platform.queryGenres(
    sortType: sortType,
    orderType: orderType,
    uriType: uriType,