listAlbums static method

Future<List<Album>> listAlbums({
  1. required MediumType mediumType,
  2. bool? hideIfEmpty = true,
})

List all available gallery albums and counts number of items of MediumType.

Implementation

static Future<List<Album>> listAlbums({
  required MediumType mediumType,
  bool? hideIfEmpty = true,
}) async {
  final json = await _channel.invokeMethod('listAlbums', {
    'mediumType': mediumTypeToJson(mediumType),
    'hideIfEmpty': hideIfEmpty,
  });
  return json.map<Album>((x) => Album.fromJson(x)).toList();
}