Extensions

WebView

WebView extension

Embed web content and control navigation in a native WebView.

Enable the extension

Add the extension key to ruflet.yaml:

extensions:
  - webview

Run ruflet run during development or ruflet build <target> for a release. Extension packages are compiled into the Ruflet client, so rebuild the client after changing this list.

Ruby DSL example

browser = web_view(
  url: "https://ruflet.dev",
  expand: true,
  on_page_ended: ->(event) { puts "Loaded #{event.value}" },
  on_web_resource_error: ->(event) { warn event.data }
)
page.add(browser)
browser.get_title(on_result: ->(title, error) { puts(error || title) })

API provided

  • Extension key: webview
  • Flet package: flet_webview
  • Kind: Web content control
  • WebView control reference — complete helpers, properties, events, and methods.

Permissions and platforms

No protected service declaration is added automatically. Platform support still follows the underlying Flet extension, so test every target you ship.

Build behavior

Ruflet resolves the extension key to flet_webview and includes that Flet package through the client extension pipeline. Application code uses the Ruby DSL shown above; do not add the package directly to your app's Flutter dependencies.