Skip to content

Commit

Permalink
fix: iOSで画像保存時にパーミッション許可が表示されないのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
4ster1sk committed Dec 17, 2024
1 parent b01c83c commit e949b51
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/state_notifier/common/download_file_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit e949b51

Please sign in to comment.