Skip to content
pubscout

smart_permission

1.1.0, released 4 weeks ago by an unverified publisher

Flutter runtime permissions made easy with adaptive dialogs and permission gates.

WASM-ready
$ flutter pub add smart_permission
Source repository

What it does

Simplifies handling runtime permissions in Flutter by wrapping permission_handler with one-line requests, adaptive dialogs, rationale flows, and settings round-trips. It also provides a PermissionGate widget to wrap UI that requires specific permissions.

AI-written summary of version 1.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to request permissions with automatic adaptive explanation and settings dialogs.
  • You want to guard UI widgets behind a permission check using PermissionGate.
  • You need a robust fallback flow when permissions are permanently denied or restricted.

Skip it when

  • You need permission handling on macOS or Linux platforms, which are not supported.
  • You prefer writing custom platform permission dialogs and state management from scratch.

Strengths

  • Handles complex permission flows (denied, permanently denied, restricted) automatically.
  • Includes a PermissionGate widget that re-checks status when returning to the foreground.
  • Provides built-in testing support with FakeSmartPermissionGateway.

Weaknesses

  • Relies on permission_handler and inherits its platform limitations (no macOS or Linux support).
  • Requires platform-specific configuration in AndroidManifest.xml, Info.plist, and optionally Podfile.

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
No
Direct dependencies
1

Requires adding permissions to AndroidManifest.xml, usage descriptions to iOS Info.plist, configuring Gradle compileSdk, and optionally setting up Podfile macros for iOS CocoaPods.

final granted = await SmartPermission.request(
  context,
  permission: Permission.camera,
  description: 'We need the camera to scan QR codes.',
);
if (granted) openScanner();

Alternatives

Packages that do the same job and could replace smart_permission.

Works with

Packages commonly used together with smart_permission: ones it builds on, ones built on it, and its own family.