FaiWebViewItemWidget constructor

FaiWebViewItemWidget({
  1. String? url,
  2. String? htmlData,
  3. String? htmlBlockData,
  4. bool isLog = false,
  5. bool htmlImageIsClick = false,
  6. dynamic imageCallBack(
    1. int? index,
    2. String? url,
    3. List<String>? images
    )?,
  7. dynamic callback(
    1. int? code,
    2. String? message,
    3. dynamic content
    )?,
  8. FaiWebViewController? controller,
  9. WebViewCacheMode webViewCacheMode = WebViewCacheMode.LOAD_DEFAULT,
})

Implementation

FaiWebViewItemWidget({
  //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,
  // 为 Html 页面中所有的图片添加 点击事件 并通过回调 通知 Flutter 页面
  // 只有使用 htmlBlockData 属性加载的页面才会有此效果
  this.htmlImageIsClick = false,
  // Html 页面中图片点击回调
  this.imageCallBack,
  // Html 页面中所有的消息回调
  this.callback,
  this.controller,
  this.webViewCacheMode = WebViewCacheMode.LOAD_DEFAULT,
});