Skip to main content

universal_document_viewer 0.1.3 copy "universal_document_viewer: ^0.1.3" to clipboard
universal_document_viewer: ^0.1.3 copied to clipboard

Open and read PDF, Word (.docx), Excel (.xlsx), CSV, PowerPoint (.pptx) and text documents in Flutter, with its own document engines.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'library.dart';
import 'pages/home_page.dart';

/// A test app for universal_document_viewer: sample documents in every format the kit
/// reads, opened with the ready-made DocumentViewer or with the per-format
/// readers, plus your own files. Reading positions are saved, so reopening
/// a document (and its thumbnail) resumes where you left off.
Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  final library = await DocumentLibrary.load();
  runApp(ExampleApp(library: library));
}

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key, required this.library});

  final DocumentLibrary library;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'universal_document_viewer',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(colorSchemeSeed: Colors.indigo),
      darkTheme: ThemeData(colorSchemeSeed: Colors.indigo, brightness: Brightness.dark),
      home: HomePage(library: library),
    );
  }
}
0
likes
155
points
0
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Open and read PDF, Word (.docx), Excel (.xlsx), CSV, PowerPoint (.pptx) and text documents in Flutter, with its own document engines.

Repository (GitHub)
View/report issues
Contributing

Topics

#pdf #docx #xlsx #document-viewer #reader

License

MIT (license)

Dependencies

archive, code_assets, crypto, ffi, flutter, hooks, meta, path, two_dimensional_scrollables, url_launcher, vector_math, xml

More

Packages that depend on universal_document_viewer