pdf_thumbnail 0.1.1+1 pdf_thumbnail: ^0.1.1+1 copied to clipboard
Thumbnail viewer for PDF files. Supports Android and iOS. Simply add widget and give the file path.
Pdf Thumbnail #
Thumbnail viewer for pdfs
Installation π» #
β In order to start using Pdf Thumbnail you must have the Flutter SDK installed on your machine.
Add pdf_thumbnail
to your pubspec.yaml
:
dependencies:
pdf_thumbnail:
Install it:
flutter packages get
Example βοΈ #
return Stack(
children: [
SizedBox(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
child: PdfViewer(
filePath: snapshot.data!.path,
),
),
if (showThumbnail)
Positioned(
bottom: 0,
width: MediaQuery.of(context).size.width,
// Here's the thumbnail widget.
child: PdfThumbnail.fromFile(snapshot.data!.path),
),
],
);
Demo
Roadmap πΊοΈ #
- β Customization for colors, decoration etc.
- β onTap callback and page number.
- β Different layouts and scroll axises.
- β Caching.