uploadMultipleImages static method
Uploads multiple image files to Firebase Storage.
imageFiles: A list of image files to upload.userId: The user ID used to construct the storage path for each image.customPath: A custom storage path (optional). If provided, this will override the default path.
Returns a list of download URLs for successfully uploaded images.
Implementation
static Future<List<String>> uploadMultipleImages(
List<File> imageFiles, String userId, {String? customPath}) async {
List<String> uploadedPaths = [];
for (var imageFile in imageFiles) {
String? imagePath = await uploadImage(imageFile, userId, customPath: customPath);
if (imagePath != null) {
uploadedPaths.add(imagePath);
}
}
return uploadedPaths;
}