fwfh_webview 0.15.4 copy "fwfh_webview: ^0.15.4" to clipboard
fwfh_webview: ^0.15.4 copied to clipboard

Platformweb

WidgetFactory extension to render IFRAME with the official WebView plugin.

WebViewFactory #

Flutter codecov Pub

WidgetFactory extension to render IFRAME with the official WebView plugin. This is a companion add-on for flutter_widget_from_html_core package.

Live demo: https://demo.fwfh.dev/#/iframe

Getting Started #

Add this to your app's pubspec.yaml file:

dependencies:
  flutter_widget_from_html_core: any
  fwfh_webview: ^0.15.4

Usage #

Then use HtmlWidget with a custom factory:

import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
import 'package:fwfh_webview/fwfh_webview.dart';

// ...

HtmlWidget(
  html,
  factoryBuilder: () => MyWidgetFactory(),
)

// ...

class MyWidgetFactory extends WidgetFactory with WebViewFactory {
  // optional: override getter to configure how WebViews are built
  bool get webViewMediaPlaybackAlwaysAllow => true;
  String? get webViewUserAgent => 'My app';
}

Features #

Configurable getters:

Type Default
webView bool true
webViewDebuggingEnabled bool false
webViewGestureRecognizers Set empty
webViewJs bool true
webViewMediaPlaybackAlwaysAllow bool false
webViewOnAndroidHideCustomWidget Function null
webViewOnAndroidShowCustomWidget Function null
webViewUnsupportedWorkaroundForIssue37 bool true
webViewUserAgent String? null

Supported IFRAME attributes:

  • src
  • width, height
  • sandbox
    • allow-scripts
41
likes
160
points
265k
downloads

Publisher

verified publisherdaohoangson.com

Weekly Downloads

WidgetFactory extension to render IFRAME with the official WebView plugin.

Repository (GitHub)

Topics

#iframe #fwfh

Documentation

API reference

Funding

Consider supporting this project:

patreon.com
buymeacoffee.com

License

MIT (license)

Dependencies

flutter, flutter_widget_from_html_core, logging, web, webview_flutter, webview_flutter_android, webview_flutter_wkwebview

More

Packages that depend on fwfh_webview