如何在颤振中的 webview 中显示 pdf

srk2k14

如何在颤振中在 webview 中显示 pdf。

我已经将 pdf fle 上传到 fireabse 数据库和存储。.

现在我想在检索页面或主屏幕中下载并打开 te pdf

我也收到了上传的pdf的downloadURL

Container(
    child: PDfFile1 != null && WCardPDFURL == null ? PDF.file(
      PDfFile1,
      height: 600,
      width: MediaQuery.of(context).size.width * 0.90,
    ) : PDfFile1 == null && WCardPDFURL == null?
    FlatButton(
        onPressed: (){
          _getLocalImage4();
        },   child: Icon(Icons.picture_as_pdf,size: 80,color:Colors.red,) ) :

    //Image.file(PDfFile1, width: 200, height: 100,),
    Image.file(
      PDfFile1,
      fit: BoxFit.cover,
      height: 250,
    ),
  ),
温莎_艾略特

如果您的 PDF 文件在 firebase 存储中,您可以使用 firebase 存储为您的 PDF 创建一个 url。然后在带有webview_flutter插件的 Web_view 中打开此 URL

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章