RequestGuardedMethodExtension extension
Helper extension hat provide methods to safely request permissions.
- on
Methods
-
requestGuarded(
BuildContext context, {PermissionGuardOptions options = const PermissionGuardOptions(), bool barrierDismissible = true, Color? barrierColor = Colors.black54, String? barrierLabel, bool useSafeArea = true, RouteSettings? routeSettings, Offset? anchorPoint, Color? backgroundColor, EdgeInsets insetPadding = const EdgeInsets.all(24), EdgeInsets contentPadding = const EdgeInsets.all(24), bool fillAvailableSpace = false}) → Future< PermissionStatus?> - Tries the default permission request, then if the native dialog can't be opened (for example because of PermissionStatus.permanentlyDenied), it shows the PermissionGuard dialog.