pdfrx_fork 0.0.3 copy "pdfrx_fork: ^0.0.3" to clipboard
pdfrx_fork: ^0.0.3 copied to clipboard

A clone version of pdfrx package with some additional features and bug fixes supporting for Flutter < 3.19.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:pdfrx_fork/pdfrx_fork.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'PDF Example',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'PDF Example'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    final uri = Uri.parse('https://pdfobject.com/pdf/sample.pdf');
    final params = PdfViewerParams(
      backgroundColor: Colors.white,
      loadingBannerBuilder: (context, bytesDownloaded, totalBytes) {
        return const Center(child: CircularProgressIndicator.adaptive());
      },
    );
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: PdfViewer.uri(uri, params: params),
    );
  }
}
2
likes
80
pub points
49%
popularity

Publisher

unverified uploader

A clone version of pdfrx package with some additional features and bug fixes supporting for Flutter < 3.19.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

collection, crypto, ffi, flutter, http, intl, path, path_provider, rxdart, synchronized, url_launcher, vector_math

More

Packages that depend on pdfrx_fork