open_document 1.0.7

OpenDocument generate a local folder, for file and document storage, also can open pdf, xlsx, docs, ppt and zip files. You can also locate your files by implementing MyFilesScreen you can change folde [. ]

open_document #

Used to create a folder on the user's mobile phone and Desktop;

Opening pdf, xlsx, docs, ppt and zip files #

Getting Started #

Android ->> config res -> create folder -> xml -> create provider_paths.xml

Add AndroidManifest :

iOs config -> info.plist Add Create folder em Document

 LSSupportsOpeningDocumentsInPlace 

USED -> #

final name = await OpenDocument.getNameFile(url: url); final path = await OpenDocument.getPathDocument(); filePath = "$path/$name"; final isCheck = await OpenDocument.checkDocument(filePath: filePath); try < if (!isCheck) < filePath = await downloadFile(filePath: "$filePath", url: url); >await OpenDocument.openDocument(filePath: filePath); > on OpenDocumentException catch (e) < debugPrint("ERROR: $"); filePath = 'Failed to get platform version.'; > Future downloadFile() async < // CancelToken cancelToken = CancelToken(); Dio dio = new Dio(); await dio.download( url, filePath, onReceiveProgress: (count, total) < debugPrint('---Download----Rec: $count, Total: $total'); setState(() < _platformVersion = ((count / total) * 100).toStringAsFixed(0) + "%"; >); >, ); return filePath; > 

How to access the folder created with the files and view and delete: #

With StyleFile you can change some settings of Viewing Your Screen with Your Files

StyleMyFile.elevatedButtonText = "Compartilhar"; #

Call preview screen

pushScreen() async < String name = await OpenDocument.getNameFolder(); Navigator.of(context).push( MaterialPageRoute( builder: (context) =>MyFilesScreen(filePath: name), ), ); >