Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PermissionHandler #3276

Merged
merged 6 commits into from
May 23, 2024
Merged

Conversation

lekshmanmj
Copy link
Contributor

@lekshmanmj lekshmanmj commented May 11, 2024

Test Code:

import flet as ft


def main(page: ft.Page):
    page.scroll = ft.ScrollMode.ADAPTIVE
    page.add(ft.SafeArea(ft.Text("PermissionHandler test")))
    ph = ft.PermissionHandler()
    page.overlay.append(ph)
    page.update()

    async def on_check_permission(e):
        page.add(ft.SafeArea(ft.Text(await ph.microphone.check_permission_async())))

    check_permission_button = ft.TextButton(
        "Check Permission", on_click=on_check_permission
    )

    async def on_request_permission(e):
        page.add(ft.SafeArea(ft.Text(await ph.microphone.request_permission_async())))

    request_permission_button = ft.TextButton(
        "Request Permission", on_click=on_request_permission
    )
    page.add(
        ft.SafeArea(check_permission_button), ft.SafeArea(request_permission_button)
    )


ft.app(main)

@FeodorFitsner FeodorFitsner merged commit 38feaf3 into flet-dev:main May 23, 2024
2 checks passed
@lekshmanmj lekshmanmj deleted the permission_handler branch May 24, 2024 19:19
zrr1999 pushed a commit to zrr1999/flet that referenced this pull request Jul 17, 2024
* PermissionHandler: Initial Commit

* PermissionHandler: Include All PermissionStatus

* PermissionHandler: Resolve Pubspeck.lock Conflict

* PermissionHandler: Resolve Pubspec.lock Conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants