pdf_viewer_plus 2.1.0
pdf_viewer_plus: ^2.1.0 copied to clipboard
A PDF viewer with enhanced features including a thumbnail sidebar for easy navigation.
import 'package:flutter/material.dart';
import 'package:pdf_viewer_plus/pdf_viewer_plus.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'PDF Viewer Plus Example',
theme: ThemeData(colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue)),
home: const PdfViewerExample(),
);
}
}
class PdfViewerExample extends StatelessWidget {
const PdfViewerExample({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('UAPP Observer Banque Finance 2026', style: TextStyle(color: Colors.white)),
backgroundColor: Color(0xFF3D765F),
),
body: const PdfViewer(
pdfPath: 'assets/sample.pdf',
initialSidebarOpen: false,
sidebarWidth: 180,
thumbnailHeight: 160,
sidebarBackgroundColor: Color(0xFFEEEEEE),
),
);
}
}