Skip to content

Commit

Permalink
fix: iOSで画像保存時にパーミッション許可が表示されないのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
4ster1sk committed Dec 22, 2024
1 parent b01c83c commit 117b0ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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
2 changes: 1 addition & 1 deletion lib/state_notifier/common/download_file_notifier.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 117b0ea

Please sign in to comment.