패키지, 저장소 및 앱 카테고리 검색

패키지 상세v3.3.0

thumbnailer

다양한 MIME 유형의 파일에서 썸네일을 생성할 수 있는 플러그인입니다. 특정 MIME 유형에 대해 썸네일 생성이 지원되지 않으면 대체 아이콘을 반환합니다.

AndroidiOSWebmacOSWindows
30일 다운로드
5.5천
좋아요
106
Pub 점수
150

패키지 설치

flutter pub add thumbnailer

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Thumbnailer는 이미지, 문서, 비디오 등 다양한 MIME 유형의 파일에서 썸네일을 생성하는 Flutter 플러그인입니다. 파일의 MIME 유형이 썸네일 생성을 지원하지 않을 경우 대체 아이콘을 반환합니다. 이 플러그인은 Android, iOS, Web, macOS, Windows 등 여러 플랫폼을 지원하여 크로스플랫폼 앱에서 파일 브라우징 및 미리보기 기능에 이상적입니다. 각 파일 형식에 맞는 사용자 정의 구현 없이 시각적 미리보기를 표시하는 과정을 단순화합니다.

사용 사례

  • 파일 탐색기 UI
  • 문서 미리보기 화면
  • 미디어 갤러리 애플리케이션
  • 자산 관리 도구
  • 사용자 업로드 미리보기

주요 기능

  • 여러 MIME 유형을 지원합니다
  • 지원되지 않는 유형에 대한 예비 아이콘
  • 크로스 플랫폼 호환성
  • 간단한 API 통합
  • 자동 썸네일 생성

적합한 대상

  • 파일 매니저를 구축하는 개발자
  • 시각적 파일 미리보기가 필요한 앱
  • 다양한 파일 형식 처리를 지원하는 프로젝트
  • 크로스 플랫폼 데스크톱 및 모바일 앱
  • 빠른 자산 시각화가 필요한 UI

고려 사항

  • 지원되는 MIME 유형에 제한됨
  • 백업 아이콘은 사용자 지정이 안 될 수 있습니다
  • 성능은 파일 크기에 따라 달라집니다
  • 모바일에서 플랫폼별 권한이 필요합니다
  • 고해상도 출력 요구 사항에 적합하지 않습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

thumbnailer

pub package

A Flutter plugin that is able to generate thumbnails for images, pdf and xlsx files

  • if thumbnail generation is not supported for specific mime type, then a fallback icon from FontAwesome is returned
  • supports registering custom mime type handlers for dynamic extendability
  • resulting thumbnail (or fallback icon) is flutter widget
  • supports custom resizing/styling of the resulting thumbnail

Why

In time of creation of this plugin, there was no available solution on pub.dev

Usage

To use this plugin, add thumbnailer as a dependency in your pubspec.yaml file.

Icons

By default, plugin provides following icons based on mimetype

MIME Type Icon
image image
application/pdf pdf
application/msword doc
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
application/vnd.oasis.opendocument.text odt
application/vnd.ms-excel xls
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
application/vnd.oasis.opendocument.spreadsheet ods
application/vnd.ms-powerpoint ppt
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
application/vnd.oasis.opendocument.presentation odp
text/plain txt
text/csv csv
application/x-archive archive
application/x-cpio cpio
application/x-shar shar
application/x-iso9660-image iso9660
application/x-sbx sbx
application/x-tar tar
application/x-bzip2 bzip2
application/gzip gzip
application/x-lzip lzip
application/x-lzma lzma
application/x-lzop lzop
application/x-snappy-framed snappy
application/x-xz xz
application/x-compress compress
application/zstd zstd
application/java-archive jar
application/octet-stream octet-stream
application/vnd.android.package-archive apk
application/vnd.ms-cab-compressed cab
application/x-7z-compressed 7z
application/x-ace-compressed ace
application/x-alz-compressed alz
application/x-apple-diskimage dmg
application/x-arj arj
application/x-astrotite-afa afa
application/x-b1 b1
application/x-cfs-compressed cfs
application/x-dar dar
application/x-dgc-compressed dgc
application/x-freearc arc
application/x-gca-compressed gca
application/x-gtar gtar
application/x-lzh lzh
application/x-lzx lzx
application/x-ms-wim wim
application/x-rar-compressed rar
application/x-stuffit sit
application/x-stuffitx sitx
application/x-xar xar
application/x-zoo zoo
application/zip zip
text/html html
text/javascript js
text/css css
text/x-python py
application/x-python-code pyo
text/xml xml
application/xml xml
text/x-c c
application/java java
application/java-byte-code class
application/x-java-class class
application/x-csh csh
text/x-script.csh csh
text/x-fortran f90
text/x-h h
application/x-ksh ksh
text/x-script.ksh ksh
application/x-latex tex
application/x-lisp lisp
text/x-script.lisp lisp
text/x-m m
text/x-pascal pas
text/x-script.perl pl
application/postscript ps
text/x-script.phyton py
application/x-bytecode.python pyc
text/x-asm asm
application/x-bsh bsh
application/x-sh sh
text/x-script.sh sh
text/x-script.zsh zsh
default file

You can override these, or add custom one using Thumbnailer.addCustomMimeTypesToIconDataMappings

Generation strategies

Thunbnailer allows you to provide custom thumbnail based on dynamic variables like content of file. Basic implementacion have following generation strategies:

  • Images — show inlined image
  • PDF — Show highlight of first page
  • XLS / ODT — Show highlight of first sheet.

You can extend these using Thumbnailer.addCustomGenerationStrategies

Example

Check the example tab here in pub.dev or example project on GitHub

Contribution and Support

  • Contributions are welcome!
  • If you want to contribute code please create a PR
  • If you find a bug or want a feature, please fill an issue

카테고리

의존성

의존성 목록 4 개

소스 저장소

이 패키지를 사용하는 프로젝트