fwfh_webview 0.6.1+2
fwfh_webview: ^0.6.1+2 copied to clipboard

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.

Getting Started #

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

dependencies:
  flutter_widget_from_html_core: any
  fwfh_webview: ^0.6.0

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:

TypeDefault
webViewbooltrue
webViewDebuggingEnabledboolfalse
webViewJsbooltrue
webViewMediaPlaybackAlwaysAllowboolfalse
webViewUserAgentStringnull

Supported IFRAME attributes:

  • src
  • width, height
  • sandbox
    • allow-scripts
6
likes
130
pub points
98%
popularity

Publisher

daohoangson.com

WidgetFactory extension to render IFRAME with the official WebView plugin.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, flutter_widget_from_html_core, webview_flutter

More

Packages that depend on fwfh_webview