From 117b0ea02eec028fe507610023520a30158d0ac6 Mon Sep 17 00:00:00 2001 From: 4sterisk <4sterisk@ymail.ne.jp> Date: Wed, 18 Dec 2024 06:28:45 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20iOS=E3=81=A7=E7=94=BB=E5=83=8F=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=99=82=E3=81=AB=E3=83=91=E3=83=BC=E3=83=9F=E3=83=83?= =?UTF-8?q?=E3=82=B7=E3=83=A7=E3=83=B3=E8=A8=B1=E5=8F=AF=E3=81=8C=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84=E3=81=AE=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/state_notifier/common/download_file_notifier.dart | 5 ++++- lib/state_notifier/common/download_file_notifier.g.dart | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) 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)