Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 550 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 550 Bytes

WebView control for Flet

WebView control for Flet.

Usage

Add flet-webview as dependency (pyproject.toml or requirements.txt) to your Flet project.

Example

import flet as ft

import flet_webview as fwv

def main(page: ft.Page):
    wv = fwv.WebView(
        url="https://flet.dev",
        on_page_started=lambda _: print("Page started"),
        on_page_ended=lambda _: print("Page ended"),
        on_web_resource_error=lambda e: print("Page error:", e.data),
        expand=True,
    )
    page.add(wv)

ft.app(main)