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

outdated

Generate a thumbnail for a file based on the file extension. Uses the native files previewer on iOS.

flutter_file_preview #

Can generate an preview image based on the file extension. Uses the native files previewer on iOS.

Getting Started #

Generate a preview Widget by calling await FilePreview.getThumbnail(file.path).

  • An image file
  • A pdf file
  • A pdf file where a preview cannot be rendered

Usage #

final File file = await FilePicker.getFile();
try {
    final thumbnail = await FilePreview.getThumbnail(file.path);
    setState(() {
        image = thumbnail;
    });
} catch (e) {
    image = Image.asset("");
}
40
likes
0
pub points
90%
popularity

Publisher

verified publisherdutchcodingcompany.com

Generate a thumbnail for a file based on the file extension. Uses the native files previewer on iOS.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, native_pdf_renderer, path

More

Packages that depend on file_previewer