preview_file 0.0.1 copy "preview_file: ^0.0.1" to clipboard
preview_file: ^0.0.1 copied to clipboard

A package to preview files

Package will return a widget that will preview the file. This will makes it easier to preview the files in Flutter. You need to pass the file path and the width you need to the widget and it will return the preview of the file.

Features #

If you want to preview a file from url, you can use:

Container(
child: FilePreview(
//filePath: uploadModel.imageFile!.path,
fileUrl: 'https://www.ledzeppelin.com/sites/g/files//g2000013721/files/sites/default/files/201702/1968_001.jpg',
width: 200,
).preview(),
);

If you have the file in the device, you can pass the file path to the widget.

Getting started #

Add the package to your pubspec.yaml file:

dependencies:
  file_preview: ^0.0.1

Usage #

You can just pass the file path and the width you need to the widget and it will return the preview of the file.

Container(
child: FilePreview(
filePath: file.path,
width: 100,
).preview(),
);

Additional information #

This package is still in development and will be updated with more features in the future. If you have any suggestions or issues, please create an issue in the repository.

4
likes
130
points
71
downloads

Publisher

unverified uploader

Weekly Downloads

A package to preview files

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

dio, flutter, path, pdfx

More

Packages that depend on preview_file