fix: request install-packages permission at runtime before APK install

Android 8+ requires canRequestPackageInstalls() to return true even when
REQUEST_INSTALL_PACKAGES is declared in the manifest. Add permission_handler
and check/request Permission.requestInstallPackages before downloading;
redirects user to Settings if not granted and shows a clear error message.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-16 11:56:24 -04:00
parent c3d9cc273f
commit 9f1d2317af
2 changed files with 18 additions and 0 deletions
+1
View File
@@ -22,6 +22,7 @@ dependencies:
markdown: ^7.2.2
package_info_plus: ^9.0.0
open_file: ^3.3.2
permission_handler: ^11.3.1
flutter_inappwebview: ^6.1.5
flutter_markdown_plus: ^1.0.7
google_fonts: ^8.0.2