HtmlWidget constructor
- String html,
- {bool buildAsync,
- AsyncWidgetBuilder<
Widget> buildAsyncBuilder, - bool enableCaching: true,
- WidgetFactory factoryBuilder(
- Key key,
- Uri baseUrl,
- CustomStylesBuilder customStylesBuilder,
- CustomWidgetBuilder customWidgetBuilder,
- Color hyperlinkColor,
- void onTapUrl( ),
- EdgeInsets tableCellPadding: const EdgeInsets.all(5),
- TextStyle textStyle: const TextStyle(),
- bool unsupportedWebViewWorkaroundForIssue37: false,
- bool webView: false,
- bool webViewJs: true}
Creates a widget that builds Flutter widget tree from html.
The html
argument must not be null.
Implementation
HtmlWidget(
String html, {
bool buildAsync,
AsyncWidgetBuilder<Widget> buildAsyncBuilder,
bool enableCaching = true,
WidgetFactory Function() factoryBuilder,
Key key,
Uri baseUrl,
CustomStylesBuilder customStylesBuilder,
CustomWidgetBuilder customWidgetBuilder,
Color hyperlinkColor,
void Function(String) onTapUrl,
EdgeInsets tableCellPadding = const EdgeInsets.all(5),
TextStyle textStyle = const TextStyle(),
this.unsupportedWebViewWorkaroundForIssue37 = false,
this.webView = false,
this.webViewJs = true,
}) : assert(html != null),
super(
html,
baseUrl: baseUrl,
buildAsync: buildAsync,
buildAsyncBuilder: buildAsyncBuilder ?? _buildAsyncBuilder,
customStylesBuilder: customStylesBuilder,
customWidgetBuilder: customWidgetBuilder,
enableCaching: enableCaching,
factoryBuilder: factoryBuilder ?? _getEnhancedWf,
hyperlinkColor: hyperlinkColor,
onTapUrl: onTapUrl,
textStyle: textStyle,
key: key,
);