findLatest method

Future<List<LocalImage>> findLatest(
  1. int maxImages
)

Returns the newest images on the local device up to maxImages in length.

This list may be empty if there are no images on the device or the user has denied permission to see their local images.

Implementation

Future<List<LocalImage>> findLatest(int maxImages) async {
  if (!_initWorked) {
    throw LocalImageProviderNotInitializedException();
  }
  final List<dynamic> images =
      await LocalImageProviderPlatform.instance.findLatest(maxImages);
  return _jsonToLocalImages(images);
}