flet-webview#
A Flet extension to web content in Flet apps using WebView.
It is based on the webview_flutter and webview_flutter_web Flutter packages.
Platform Support#
This package supports the following platforms:
Platform | Supported |
---|---|
Windows | ❌ |
macOS | ✅ |
Linux | ❌ |
iOS | ✅ |
Android | ✅ |
Web | ✅ |
Example#
main.py
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)