FaiWebViewWidget constructor
FaiWebViewWidget({
- String? url,
- String? htmlData,
- String? htmlBlockData,
- bool isLog = false,
- WebViewCacheMode webViewCacheMode = WebViewCacheMode.LOAD_DEFAULT,
- bool htmlImageIsClick = false,
- dynamic imageCallBack()?,
- dynamic callback()?,
- FaiWebViewController? controller,
- ScrollController? scrollController,
- Widget? headerWidget,
- Function? onRefresh,
- Widget? appBar,
- bool showLoading = true,
- Widget? loadginWidget,
- double? webViewHeight,
- double? minHeight,
- Key? key,
Implementation
FaiWebViewWidget(
{
//webview 加载网页链接
this.url,
//webview 加载 完整的 html 文件数据 如 <html> .... </html>
// 不完整的 html 文件数据 如 <p></p> 配置到此项,用此属性来加载,只会渲染 <p> ... </p> 中已有的样式 不会适配移动端显示
this.htmlData,
//webview 加载完整的 html 文件数据 或者是 不完整的 html 文件数据 如 <p></p>
//不完整的 html 文件数据 如 <p></p> 配置到此项,会自动将不完整的 html 文件数据 添加 <html><head> .. </head> <body> 原来的内容 </body></html>,并适配移动端
this.htmlBlockData,
//输出 Log 日志功能
this.isLog = false,
this.webViewCacheMode = WebViewCacheMode.LOAD_DEFAULT,
// 为 Html 页面中所有的图片添加 点击事件 并通过回调 通知 Flutter 页面
// 只有使用 htmlBlockData 属性加载的页面才会有此效果
this.htmlImageIsClick = false,
// Html 页面中图片点击回调
this.imageCallBack,
// Html 页面中所有的消息回调
this.callback,
this.controller,
this.scrollController,
//混合加载时 WebView 顶部的 Widget
this.headerWidget,
this.onRefresh,
this.appBar,
//是否显示默认的加载中
this.showLoading = true,
//自定义加载中 Widget
this.loadginWidget,
//WebView 下面的 Widget
this.footerWidget,
//webView 的高度 如果指定了 会使用这里的值 如果未指定 会自动测量
this.webViewHeight,
this.minHeight,
Key? key})
: super(key: key);