getPublicUrls method

Future<List<Uri?>> getPublicUrls({
  1. required String storageId,
  2. required List<String> paths,
})

Bulk lookup of a list of public links to files given a list of paths in the storage. If any given file isn't public or if no such file exists, null is stored at the corresponding position in the output list. Saves on server roundtrips if a large number of public URLs must be fetched, relative to calling getPublicUrl via an endpoint for each one.

Implementation

Future<List<Uri?>> getPublicUrls({
  required String storageId,
  required List<String> paths,
}) =>
    Future.wait(
        paths.map((path) => getPublicUrl(storageId: storageId, path: path)));