findAlbums method
Returns the list of LocalAlbum available on the device matching the localAlbumType
Implementation
Future<List<LocalAlbum>> findAlbums(LocalAlbumType localAlbumType) async {
if (!_initWorked) {
throw LocalImageProviderNotInitializedException();
}
final List<dynamic> albums =
await LocalImageProviderPlatform.instance.findAlbums(localAlbumType);
return albums.map((albumJson) {
// print(albumJson);
Map<String, dynamic> photoMap = jsonDecode(albumJson);
return LocalAlbum.fromJson(photoMap);
}).toList();
}