FaiWebViewWidget constructor

FaiWebViewWidget({
  1. String? url,
  2. String? htmlData,
  3. String? htmlBlockData,
  4. bool isLog = false,
  5. WebViewCacheMode webViewCacheMode = WebViewCacheMode.LOAD_DEFAULT,
  6. bool htmlImageIsClick = false,
  7. dynamic imageCallBack(
    1. int index,
    2. String url,
    3. List<String> images
    )?,
  8. dynamic callback(
    1. int? code,
    2. String? message,
    3. dynamic content
    )?,
  9. FaiWebViewController? controller,
  10. ScrollController? scrollController,
  11. Widget? headerWidget,
  12. Function? onRefresh,
  13. Widget? appBar,
  14. bool showLoading = true,
  15. Widget? loadginWidget,
  16. Widget? footerWidget,
  17. double? webViewHeight,
  18. double? minHeight,
  19. 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);