queryPlaylists method

  1. @override
Future<List<PlaylistModel>> queryPlaylists({
  1. PlaylistSortType sortType = PlaylistSortType.playlist,
  2. OrderType orderType = OrderType.asc,
})
override

Implementation

@override
Future<List<PlaylistModel>> queryPlaylists({
  PlaylistSortType sortType = PlaylistSortType.playlist,
  OrderType orderType = OrderType.asc,
}) async {
  final List<dynamic>? raw = await methodChannel.invokeListMethod<dynamic>(
    'queryPlaylists',
    {'sortType': sortType.index, 'orderType': orderType.index},
  );
  return (raw ?? [])
      .map((e) => PlaylistModel.fromMap(e as Map<dynamic, dynamic>))
      .toList();
}