PermissionHandler
PermissionHandler can check and/or request permissions from the running device for access to various components. Works on Windows, iOS, Android and web. Based on the permission_handler Dart/Flutter package.
PermissionHandler control is non-visual and should be added to page.overlay
list.
To build your Flet app that uses PermissionHandler
control, add --include-packages flet_permission_handler
to flet build
command, for example:
flet build apk --include-packages flet_permission_handler
Examples
Basic Example
loading...
Methods
check_permission(of: PermissionType)
Checks the status of the specified PermissionType
.
Returns an instance of type PermissionStatus
.
open_app_settings()
Opens the device's settings. Before calling this method, you usually want to briefly remind the user of which permission is needed and how/where precisely it is to be enabled.
Returns a boolean value: True
if the device's settings were opened successfully, False
otherwise.
request_permission(of: PermissionType)
Requests the device for access to the specified PermissionType
from the user.
Returns an instance of type PermissionStatus
.