PermissionStatus enum

Permission status returned by the platform.

Inheritance
Available extensions

Values

granted → const PermissionStatus

完全授权:功能可用

const PermissionStatus('granted')
denied → const PermissionStatus

拒绝或未授权:功能不可用,包含可重试(Deny)和系统受限(Restricted/Unknown)状态

const PermissionStatus('denied')
permanentlyDenied → const PermissionStatus

永久拒绝:功能不可用,需引导用户至系统设置

const PermissionStatus('permanentlyDenied')
limited → const PermissionStatus

部分授权:功能受限可用

  • iOS: 相册(Photos)的部分访问权限(iOS 14+),通知的临时授权
  • Android: 相册(Photos)的部分访问权限(Android 14+,用户选择"仅允许访问选定的照片和视频")
const PermissionStatus('limited')

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
String value of the status
final

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

fromString(String value) PermissionStatus
Parse status from string

Constants

values → const List<PermissionStatus>
A constant List of the values in this enum, in order of their declaration.