flutter_permission_auto_return 0.0.5
flutter_permission_auto_return: ^0.0.5 copied to clipboard
Wraps permission_handler and brings your Flutter app back to the foreground on Android after the user grants a special permission in Settings.
0.0.5 #
- Trim the
pubspec.yamldescription from 215 to 142 characters so it fits the 60–180 range pana enforces. Recovers the missing 10 pub points under "Provide a valid pubspec.yaml" without changing the meaning of the description.
0.0.4 #
- Docs: add an iOS setup section explaining the
permission_handlerpreprocessor macros (PERMISSION_CAMERA=1,PERMISSION_LOCATION=1, …) that must be declared inios/Podfilefor the system permission dialog to appear at all. Without these macros every iOS request silently returns denied — a long-standingpermission_handlergotcha that the README now spells out with a copy-pasteable Podfile snippet. - Example: when
requestWithAutoReturn()resolves topermanentlyDeniedthe demo now surfaces a native dialog with an Open Settings action and refreshes the status when the user comes back. Demonstrates the recommended recovery pattern after iOS Don't Allow and after the Android auto-return Settings trip ends without a grant. - Example Podfile: ships with the preprocessor macros enabled for the permissions exercised by the demo (camera, microphone, location, contacts, photos, notifications, calendar) so the example runs out of the box on iOS.
0.0.3 #
- Fix
Permission.locationAlways.requestWithAutoReturn()opening the generic app details page instead of the location permission page, and add auto-return to the post-grant flow.locationAlwaysis no longer routed through the special-permission code path that bypassed the runtime API.- The extension now grants foreground location first if needed, then
delegates to
permission_handler.request()so the OS redirects the user straight to the app's location-permission page (Android 11+) or shows the Allow all the time dialog (Android 10). - In parallel, the native side polls
ACCESS_BACKGROUND_LOCATIONand brings the app back to the foreground the moment the user toggles Allow all the time — same auto-return behavior as the other special permissions.
- New native method
pollPermissionAndAutoReturnthat polls + auto-returns without opening any Settings page, used by the locationAlways flow but available for any future scenario where another component already navigated the user to the right system page.
0.0.2 #
- Fix demo GIF not rendering on pub.dev — switch from raw
<img>HTML (sanitized away by pub.dev's renderer) to a plain markdown image with an absoluteraw.githubusercontent.comURL.
0.0.1 #
Initial release.
- Re-exports the full
permission_handlerAPI. - Adds
Permission.requestWithAutoReturn()extension which:- opens the appropriate Android Settings page for special permissions
(
manageExternalStorage,systemAlertWindow,requestInstallPackages,scheduleExactAlarm,ignoreBatteryOptimizations,accessNotificationPolicy,notification,locationAlways), - falls back to the app details page for any runtime permission that has been permanently denied,
- polls the system every 500 ms and brings the host app back to the foreground automatically once the permission is granted.
- opens the appropriate Android Settings page for special permissions
(
- Runtime permission auto-return covers
camera,microphone,location,locationWhenInUse,contacts,phone,sms,storage,photos,videos,audio,notification,calendar,calendarFullAccess,calendarWriteOnly,sensors,sensorsAlways,bluetooth,bluetoothScan,bluetoothConnect,bluetoothAdvertise,nearbyWifiDevices,activityRecognition,accessMediaLocation. - Adds
cancelPermissionAutoReturn()to abort an in-flight polling loop. - iOS is a passthrough to
permission_handler; auto-return is Android-only.