说明
flutter_full_pdf_viewer 可以实现从网络上下载 pdf 文件并且显示出来。
包地址:flutter_full_pdf_viewer: ^1.0.6
使用方法
1.在 pubspec.yaml 文件中添加如下的包:
dependencies:
# pdf 阅读器
flutter_full_pdf_viewer: ^1.0.6
# 获取系统目录,因为从网络获取的pdf文件,需要保存到手机,所以需要用到这个包
path_provider: ^1.5.0
2.官方demo:
import 'dart:async';
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_full_pdf_viewer/full_pdf_viewer_scaffold.dart';
import 'package:path_provider/path_p