permission_guard
2.0.1, released 2 years ago by eterkit.com
UI wrapper around permission_handler that simplifies permission state handling.
What it does
Provides a PermissionGuard widget and requestGuarded method to display appropriate UI for permission statuses. Allows extensive customization of dialogs, loaders, and texts.
AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a ready‑made UI for permission requests
- You want consistent permission handling across Android, iOS, web and desktop
- You prefer declarative widget integration with optional imperative calls
Skip it when
- You already have custom permission UI
- You only need raw permission checks without extra UI overhead
- Package size must be minimal
Strengths
- Easy to integrate with a single widget
- Highly customizable via PermissionGuardOptions
- Works on all major platforms supported by permission_handler
Weaknesses
- Adds another layer on top of permission_handler
- Limited to features of permission_handler
- May not cover very specific permission flows
Setup
- Kind
- Flutter widgets
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 1
Follow permission_handler's platform‑specific setup (Android manifest, iOS Info.plist, web config, etc.) before using permission_guard
PermissionGuard(
permission: Permission.camera,
child: _PermissionGrantedBody(),
);Alternatives
Packages that do the same job and could replace permission_guard.
- watch_connectivity
Wrapper for WatchConnectivity on iOS and Wearable APIs on Android.
85Compare - vibration
A plugin for handling the Vibration API on iOS, Android, web, and OpenHarmony.
80Compare - polar
Dart plugin wrapper for the Polar BLE SDK on Android and iOS
73Compare - smart_permission
Flutter runtime permissions made easy with adaptive dialogs and permission gates.
72Compare
Works with
Packages commonly used together with permission_guard: ones it builds on, ones built on it, and its own family.