diff --git a/lib/state_notifier/common/download_file_notifier.dart b/lib/state_notifier/common/download_file_notifier.dart index b4c4db7d5..0e8df2951 100644 --- a/lib/state_notifier/common/download_file_notifier.dart +++ b/lib/state_notifier/common/download_file_notifier.dart @@ -44,7 +44,10 @@ class DownloadFileNotifier extends _$DownloadFileNotifier { } else if (defaultTargetPlatform == TargetPlatform.iOS) { final permissionStatus = await Permission.photosAddOnly.status; if (!permissionStatus.isGranted) { - return DownloadFileResult.permissionDenied; + final p = await Permission.photosAddOnly.request(); + if (!p.isGranted) { + return DownloadFileResult.permissionDenied; + } } } diff --git a/lib/state_notifier/common/download_file_notifier.g.dart b/lib/state_notifier/common/download_file_notifier.g.dart index 09b95ecfb..1afe29df7 100644 --- a/lib/state_notifier/common/download_file_notifier.g.dart +++ b/lib/state_notifier/common/download_file_notifier.g.dart @@ -7,7 +7,7 @@ part of 'download_file_notifier.dart'; // ************************************************************************** String _$downloadFileNotifierHash() => - r'1e16b1a213ec582509b1843d15b1987e27020a26'; + r'570a3519348813c4ebee6976af9634c1350258f3'; /// See also [DownloadFileNotifier]. @ProviderFor(DownloadFileNotifier)