thumbnailer
Plugin, das in der Lage ist, Thumbnails aus Dateien mit verschiedenen MIME-Typen zu generieren. Wenn die Thumbnail-Erstellung für einen bestimmten MIME-Typ nicht unterstützt wird, wird ein Fallback-Icon zurückgegeben
Ein Flutter-Plugin, das in der Lage ist, Miniaturansichten aus Dateien mit verschiedenen MIME-Typen zu generieren. Wenn die Erstellung von Miniaturansichten für einen bestimmten MIME-Typ nicht unterstützt wird, wird ein Fallback-Symbol zurückgegeben
{"sdk":"flutter"}{"sdk":"flutter"}^11.0.0^2.9.2^1.0.1^5.14.0{"sdk":"flutter"}Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.
A Flutter plugin that is able to generate thumbnails for images, pdf and xlsx files
In time of creation of this plugin, there was no available solution on pub.dev
To use this plugin, add thumbnailer as a dependency in your pubspec.yaml file.
By default, plugin provides following icons based on mimetype
| MIME Type | Icon |
|---|---|
image |
image |
application/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
Thunbnailer allows you to provide custom thumbnail based on dynamic variables like content of file. Basic implementacion have following generation strategies:
You can extend these using Thumbnailer.addCustomGenerationStrategies
Check the example tab here in pub.dev or example project on GitHub