简体   繁体   English

如何在 flutter 中显示 Pdf 文件页面,如列表视图

[英]How to Show Pdf file pages like a listview in flutter

I have a pdf file Picked from file picker and I want to display pdf file pages like a list view items.我有一个从文件选择器中选取的 pdf 文件,我想像列表视图项目一样显示 pdf 文件页面。 On click page its show like page is selected and get page number that clicked My Final input is look like:在点击页面上,它的显示页面被选中并获取点击我的最终输入的页码如下所示:

My Required Output Image我需要的 Output 图片

Anyone help me Please任何人都请帮助我

Try this - https://pub.dev/packages/pdf_render#multi-page-view-using-listviewbuilder试试这个 - https://pub.dev/packages/pdf_render#multi-page-view-using-listviewbuilder

Then you have to use scrollDirection: Axis.horizontal, for your ListView.然后你必须为你的 ListView 使用scrollDirection: Axis.horizontal, Also, wrap PdfPageView with your custom widget that will handle selection and render checkmark.此外,使用将处理选择和呈现复选标记的自定义小部件包装PdfPageView

If you need a scrollbar, just wrap your ListView with Scrollbar widget and tune it.如果您需要滚动条,只需用Scrollbar小部件包装您的 ListView 并对其进行调整。 More info - https://api.flutter.dev/flutter/material/Scrollbar-class.html更多信息 - https://api.flutter.dev/flutter/material/Scrollbar-class.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM