downloadAllImages method

Future<void> downloadAllImages()

Implementation

Future<void> downloadAllImages() async {
  if (images.isEmpty) return;
  isLoading.value = true;
  try {
    for (var image in images) {
      if (image.funRefVal != null && image.funRefVal!.isNotEmpty) {
        await downloadFile(image.funRefVal!, silent: true);
      }
    }
    AppUtils.showSnackBar('images downloaded successfully');
  } catch (e) {
    debugPrint('Error downloading multiple files: $e');

    AppUtils.showSnackBar('Error downloading images', title: 'Error');
  } finally {
    isLoading.value = false;
  }
}