PermissionHandler control for Flet
Project description
PermissionHandler control for Flet
PermissionHandler control for Flet.
Usage
Add flet-permission-handler as dependency (pyproject.toml or requirements.txt) to your Flet project.
Example
import flet as ft
import flet_permission_handler as fph
def main(page: ft.Page):
page.scroll = ft.ScrollMode.ADAPTIVE
page.appbar = ft.AppBar(title=ft.Text("PermissionHandler Tests"))
ph = fph.PermissionHandler()
page.overlay.append(ph)
def check_permission(e):
o = ph.check_permission(e.control.data)
page.add(ft.Text(f"Checked {e.control.data.name}: {o}"))
def request_permission(e):
o = ph.request_permission(e.control.data)
page.add(ft.Text(f"Requested {e.control.data.name}: {o}"))
def open_app_settings(e):
o = ph.open_app_settings()
page.add(ft.Text(f"App Settings: {o}"))
page.add(
ft.OutlinedButton(
"Check Microphone Permission",
data=fph.PermissionType.MICROPHONE,
on_click=check_permission,
),
ft.OutlinedButton(
"Request Microphone Permission",
data=fph.PermissionType.MICROPHONE,
on_click=request_permission,
),
ft.OutlinedButton(
"Open App Settings",
on_click=open_app_settings,
),
)
ft.app(main)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flet_permission_handler-0.1.0.tar.gz.
File metadata
- Download URL: flet_permission_handler-0.1.0.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6813b1e9c333036dcf69f5d27def2bc117a5b917611b6894a126920e1daecca2
|
|
| MD5 |
5b2a59bd2bde6025bd6e684613094e73
|
|
| BLAKE2b-256 |
e119aa61f64402a80af3ffc9d3a87045b6be3d5698a3af7712c1d45916b44280
|
File details
Details for the file flet_permission_handler-0.1.0-py3-none-any.whl.
File metadata
- Download URL: flet_permission_handler-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbbbf37221e151c5d551f3bee4ac3ad87ffe405cfc6844cd4d37dd4075f9e4ab
|
|
| MD5 |
78c366dc0f6fc564cea72d2ba3902bd5
|
|
| BLAKE2b-256 |
be9ffbbd42905404401e81d6e919732181acf35989e1257d34b7a5f77d1d86cf
|