Skip to content
SirZeckPublic

About

a high-performance, lightweight PDF reader app built with Flutter

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

🌿 Leaf - Minimal, Ultra-Lightweight PDF Reader

Leaf is a distraction-free, ultra-lightweight PDF reader for Android and iOS designed for reading books, magazines, and newspapers without battery drain, storage bloat, or invasive permissions.


⚡ Highlights

  • Air-Gapped Privacy: Zero internet permissions requested. Leaf cannot send telemetry, load ads, or phone home. Your files stay 100% on your device.
  • Instant Resume Memory: Remembers your exact page across all documents. Close a book at page 18, and it reopens at page 18 instantly.
  • Tap-Anywhere Fullscreen: Tap anywhere on the screen to enter immersive fullscreen (status bar and toolbars slide away for borderless reading). Tap again to bring them back.
  • Reading Themes:
    • ☀️ Day Mode: Crisp, high-contrast reading.
    • 📜 Sepia Mode: Warm, eye-friendly parchment blend that eliminates blue light glare for long reading sessions.
    • 🌙 Night Mode: High-contrast color inversion for comfortable reading in low-light environments.
  • In-Document Text Search: Live keyword search with match counter (3 / 14), page-level highlight overlays, and next/previous match navigation.
  • Smooth Momentum Scrolling: Configured with fluid, bouncy scroll physics for reading multi-column news layouts and book chapters.
  • Zero Storage Bloat: Reads files in-place without duplicating documents into internal storage. Page bitmaps are rendered directly to RAM on-demand and discarded when scrolled past.
  • System File Integration: Automatically registered on Android and iOS to open PDFs directly from WhatsApp, Downloads, Mail, Files, or web browsers.

📂 Project Structure

pdf_reader/
├── pubspec.yaml                          # Dependencies (pdfrx, file_picker, shared_preferences, intl)
├── README.md                             # Documentation & setup guide
├── assets/
│   └── leaf_icon.jpg                     # High-resolution master icon
├── android/
│   ├── app/
│   │   ├── build.gradle.kts              # SDK 36, Java 17, R8 / ProGuard shrinking
│   │   ├── proguard-rules.pro            # Code & native symbol preservation rules
│   │   └── src/main/
│   │       ├── AndroidManifest.xml       # Air-gapped manifest with PDF intent filters
│   │       ├── kotlin/…/MainActivity.kt  # Android app entrypoint
│   │       └── res/mipmap-*/             # Custom minimal Leaf app icons
│   ├── build.gradle.kts                  # Gradle 9.3.1 build configuration
│   └── settings.gradle.kts               # Android Gradle Plugin 9.1.0 & Kotlin 2.4.0
├── ios/
│   └── Runner/
│       ├── Info.plist                    # iOS PDF Document Types & UIFileSharingEnabled
│       └── Assets.xcassets/AppIcon…/     # iOS app icon assets
└── lib/
    ├── main.dart                         # App initialization & system UI styling
    ├── models/
    │   ├── reader_theme_mode.dart        # Day, Sepia, and Night color filters
    │   ├── recent_document.dart          # Reading progress data model
    │   └── document_bookmark.dart        # Page bookmark model
    ├── services/
    │   └── storage_service.dart          # SharedPreferences persistence layer
    ├── theme/
    │   └── app_theme.dart                # Material 3 light & dark themes
    ├── screens/
    │   ├── home_screen.dart              # Recents & Bookmarks edge-to-edge lists
    │   └── reader_screen.dart            # Immersive viewer, gestures, and search
    └── widgets/
        ├── recent_file_tile.dart         # Dismissible recent document list tile
        ├── reader_controls_overlay.dart  # Top bar & bottom page scrubber slider
        ├── search_toolbar.dart           # Interactive text search bar
        ├── jump_to_page_dialog.dart      # Direct page number input dialog
        ├── theme_selector_sheet.dart     # Day / Sepia / Night selection modal
        └── bookmarks_sheet.dart          # Document bookmarks bottom sheet

🚀 Getting Started

Prerequisites

  • Flutter SDK (3.10+ recommended)
  • Android: Android Studio or Android SDK Command-line Tools (cmdline-tools)
  • iOS: macOS with Xcode installed

Run in Development

cd /Users/arpitayadav/.gemini/antigravity/scratch/pdf_reader
flutter pub get
flutter run

📦 Building Production Binaries

Android (Release APK)

To build standalone, optimized release APKs split by device architecture:

flutter build apk --release --split-per-abi

The APKs will be generated in build/app/outputs/flutter-apk/:

  • app-arm64-v8a-release.apk (~26 MB) — for modern 64-bit phones (Pixel, OnePlus, Samsung, Xiaomi, etc.)
  • app-armeabi-v7a-release.apk (~21 MB) — for older 32-bit devices

Install Directly to Connected Phone via ADB:

~/Library/Android/sdk/platform-tools/adb install -r build/app/outputs/flutter-apk/app-arm64-v8a-release.apk

Android App Bundle (for Google Play):

flutter build appbundle --release

iOS (Release IPA):

flutter build ipa --release

📄 License

This project is licensed under the MIT License.

About

a high-performance, lightweight PDF reader app built with Flutter

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages