Skip to content
pubscout

flutter_html_iframe

3.0.0, released 2 years ago by sub6resources.com

Renders <iframe> tags in flutter_html using webview_flutter.

WASM-readyQuiet but busy
$ flutter pub add flutter_html_iframe
Source repository

What it does

This package provides an IframeHtmlExtension that lets flutter_html render <iframe> elements via the webview_flutter plugin. It respects width, height, and sandbox attributes and allows a navigationDelegate to control URL loading.

AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to display iframe content inside a flutter_html widget.
  • You want sandboxed or unrestricted JavaScript control for the iframe.
  • You need to block or allow navigation within the iframe via a delegate.

Skip it when

  • You are targeting web only, as webview_flutter is not supported on web.
  • You do not need iframe support in your HTML rendering.

Strengths

  • Seamless integration with flutter_html.
  • Supports sandbox and navigationDelegate for security and control.
  • Stable release with recent updates.
  • No additional code generation required.

Weaknesses

  • Only works on platforms supported by webview_flutter (Android, iOS, macOS).
  • Does not support web platform.
  • Requires adding webview_flutter dependency.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
4

Add flutter_html_iframe to pubspec, import, and register IframeHtmlExtension in Html widget.

Widget html = Html(
  extensions: {
    IframeHtmlExtension(),
  }
);

Alternatives

Packages that do the same job and could replace flutter_html_iframe.

Works with

Packages commonly used together with flutter_html_iframe: ones it builds on, ones built on it, and its own family.