FlutterEasyPermission class

Constructors

FlutterEasyPermission()

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

addPermissionCallback({Granted? onGranted, Denied? onDenied, VoidCallback? onSettingsReturned}) → void
设置用户授权结果的回调
dispose() → void
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

has({required List<Permissions> perms, required List<PermissionGroup> permsGroup}) Future<bool>
检查权限
request({required List<Permissions> perms, required List<PermissionGroup> permsGroup, String? rationale, int requestCode = DefaultRequestCode}) → void
请求权限
showAppSettingsDialog({dynamic title = SettingsDialogTitle, dynamic rationale = SettingsDialogRationale, dynamic positiveButtonText = SettingsDialogPositiveButton, dynamic negativeButtonText = SettingsDialogNegativeButton}) → void
提示用户进入应用的设置界面并启用权限的对话框。 如果用户在对话框中点击 "确定",就会被发送到设置界面。 在Android平台,需要接收设置页面返回的通知,在addPermissionCallback中实现_onSettingsReturned