Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fluttercandies/flutter_filereader
Flutter实现的本地文件(pdf word excel 等)查看插件,非在线预览
https://github.com/fluttercandies/flutter_filereader
excel filereader flutter pdf word
Last synced: 3 months ago
JSON representation
Flutter实现的本地文件(pdf word excel 等)查看插件,非在线预览
- Host: GitHub
- URL: https://github.com/fluttercandies/flutter_filereader
- Owner: fluttercandies
- License: other
- Created: 2019-03-06T06:58:03.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-19T03:12:32.000Z (over 2 years ago)
- Last Synced: 2023-11-07T15:24:19.337Z (about 1 year ago)
- Topics: excel, filereader, flutter, pdf, word
- Language: Dart
- Homepage:
- Size: 12 MB
- Stars: 107
- Watchers: 5
- Forks: 50
- Open Issues: 39
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Flutter FileReader
[![pub package](https://img.shields.io/pub/v/flutter_filereader.svg)](https://pub.dartlang.org/packages/flutter_filereader)##### A local file view widget,Support a variety of file types, such as Doc Eexcl PPT TXT and so on,Android is implemented by Tencent X5(Not Support GooglePlay),iOS is implemented by WKWebView
## Depend on it
Add this to your package's pubspec.yaml file:1.9.1
```
dependencies:
flutter_filereader: ^1.0.0
```
1.12.x
```
dependencies:
flutter_filereader: ^2.2.0
```2.0.0
```
dependencies:
flutter_filereader: 3.0.0
```## Support File Type
* IOS `docx,doc,xlsx,xls,pptx,ppt,pdf,txt,jpg,jpeg,png`
* Android `docx,doc,xlsx,xls,pptx,ppt,pdf,txt`## Usage
### iOS
Make sure you add the following key to Info.plist for iOS
```
io.flutter.embedded_views_preview
```
### Example
```
import 'package:flutter/material.dart';
import 'package:flutter_filereader/flutter_filereader.dart';class FileReaderPage extends StatefulWidget {
final String filePath;FileReaderPage({Key: Key, this.filePath});
@override
_FileReaderPageState createState() => _FileReaderPageState();
}class _FileReaderPageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("doc"),
),
body: FileReaderView(
filePath: widget.filePath,
),
);
}
}
```## 注意事项
1. Not Support GooglePlay
2. 不支持在Android模拟器上运行
3. txt文档如果显示乱码,请将txt文档编码改成gbk