flutter_permission_auto_return 0.0.5 copy "flutter_permission_auto_return: ^0.0.5" to clipboard
flutter_permission_auto_return: ^0.0.5 copied to clipboard

discontinuedreplaced by: permission_handler_auto_back
PlatformAndroidiOS

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.yaml description 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_handler preprocessor macros (PERMISSION_CAMERA=1, PERMISSION_LOCATION=1, …) that must be declared in ios/Podfile for the system permission dialog to appear at all. Without these macros every iOS request silently returns denied — a long-standing permission_handler gotcha that the README now spells out with a copy-pasteable Podfile snippet.
  • Example: when requestWithAutoReturn() resolves to permanentlyDenied the 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.
    • locationAlways is 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_LOCATION and 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 pollPermissionAndAutoReturn that 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 absolute raw.githubusercontent.com URL.

0.0.1 #

Initial release.

  • Re-exports the full permission_handler API.
  • 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.
  • 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.
12
likes
150
points
189
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Wraps permission_handler and brings your Flutter app back to the foreground on Android after the user grants a special permission in Settings.

Repository (GitHub)
View/report issues

Topics

#permissions #permission-handler #android #settings #auto-return

License

MIT (license)

Dependencies

flutter, permission_handler

More

Packages that depend on flutter_permission_auto_return

Packages that implement flutter_permission_auto_return