GpPermissions class

Pide un permiso del sistema (cámara, ubicación, etc.) mostrando antes una explicación con el diálogo estándar de GP (GpModal.showConfirm) — así se ve igual sin importar qué módulo lo dispare, en vez de que cada uno arme su propia pantalla de "por qué necesitamos esto".

Flujo:

  1. Si ya está concedido (o es "limited", ej. fotos en iOS), no muestra nada y devuelve true directo.
  2. Si el usuario ya lo negó permanentemente, el SO no vuelve a mostrar su prompt nativo — en vez de pedirlo de nuevo, se avisa que hay que habilitarlo desde Ajustes.
  3. Caso contrario, se muestra la explicación primero; solo si el usuario confirma se dispara el prompt nativo del SO.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

request(BuildContext context, {required Permission permission, required String rationaleTitle, required String rationaleMessage, required String settingsMessage, String continueLabel = 'Continuar', String cancelLabel = 'Ahora no', IconData rationaleIcon = Icons.info_outline_rounded, String settingsTitle = 'Habilitá el permiso en Ajustes', String settingsActionLabel = 'Abrir ajustes'}) → Future<bool>