FLUTTER ECOSYSTEM

DutchCodingCompany/file_preview

DutchCodingCompany/file_preview open-source repository details.

ファイルのプレビュー のプロジェクト画像
Stars
3
Forks
22
最終プッシュ(UTC)
2024/08/16
プロジェクト状態
公開中
Dutch Coding Company GitHub avatar
GITHUB Organization

Dutch Coding Company ↗

Eindhoven, Netherlands公式サイト ↗
言語DartSwiftRubyKotlinObjective-C

使用している依存関係

依存関係一覧 5 件

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

file_previewer

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
https://raw.githubusercontent.com/DutchCodingCompany/file_preview/7d8f6ce6ddd27befc4506c077592ff55d56c63e6/images/screenshot1.png
  • A pdf file
https://raw.githubusercontent.com/DutchCodingCompany/file_preview/7d8f6ce6ddd27befc4506c077592ff55d56c63e6/images/screenshot2.png
  • A pdf file where a preview cannot be rendered
https://raw.githubusercontent.com/DutchCodingCompany/file_preview/7d8f6ce6ddd27befc4506c077592ff55d56c63e6/images/screenshot3.png

Usage

final File file = await FilePicker.getFile();
try {
    final thumbnail = await FilePreview.getThumbnail(file.path);
    setState(() {
        image = thumbnail;
    });
} catch (e) {
    image = Image.asset("");
}