novel_reader 1.0.0 copy "novel_reader: ^1.0.0" to clipboard
novel_reader: ^1.0.0 copied to clipboard

A professional-grade, highly customizable Novel/Ebook reader package for Flutter. Supports vertical scroll, horizontal paging, professional themes, and full state persistence.

Advanced Novel Reader 📖 #

pub package GitHub

A professional-grade, highly customizable Novel & Ebook Reader package for Flutter. Designed for high-performance reading experiences with a focus on premium typography and an immersive, distraction-free UI.


✨ Features #

  • 🎨 Adaptive Theme System: Sophisticated pre-built palettes including:
    • Light & Dark: Standard reading modes.
    • Sepia & Cream: Eye-friendly classic book styles.
    • AMOLED: Pure black for OLED efficiency.
    • Gray & Slate: Low-contrast professional themes.
  • 📖 Dual Navigation Modes:
    • Fluid Vertical Scroll: Standard continuous scrolling experience.
    • Horizontal Paging: Physical e-reader style pagination with dynamic text fitting based on screen size.
  • 🔠 Premium Typography:
    • Full Google Fonts integration.
    • Granular control over font size (12px to 36px), line height, and letter spacing.
    • Four-way text alignment: Left, Center, Right, and Justify.
  • 📱 Immersive Focus UI:
    • Automatically hides status bar and toolbars while reading.
    • Intelligent Tap Zones: Center to toggle controls; sides for rapid navigation.
    • Haptic Feedback: Native vibration responses on Android and iOS.
  • 💾 State Persistence: Automatically remembers and restores theme, font settings, and reading progress (current chapter and scroll position).
  • 🌍 Localization: Built-in support for multiple languages.
  • 🚀 Multi-Platform: Native optimizations for Android, iOS, Web, Windows, macOS, and Linux.

🛠️ Installation #

Add novel_reader to your pubspec.yaml:

dependencies:
  novel_reader: ^1.0.0

Then, run:

flutter pub get

🚀 Quick Start #

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

void main() {
  runApp(const MaterialApp(
    home: NovelReader(
      config: ReaderConfig(
        title: "The Great Gatsby",
        chapters: [
          Chapter(
            id: "1",
            title: "Chapter 1",
            content: "In my younger and more vulnerable years...",
            order: 1,
          ),
          // Add more chapters for the full experience
        ],
      ),
    ),
  ));
}

⚙️ Advanced Configuration #

🌍 Localization #

To use the built-in localized strings, register the ReaderLocalizationsDelegate in your MaterialApp:

MaterialApp(
  localizationsDelegates: const [
    ReaderLocalizationsDelegate(),
    GlobalMaterialLocalizations.delegate,
    GlobalWidgetsLocalizations.delegate,
    GlobalCupertinoLocalizations.delegate,
  ],
  supportedLocales: const [
    Locale('en'),
  ],
  home: MyReaderScreen(),
)

⌨️ Desktop & Web Support #

On non-mobile platforms, the reader supports native keyboard shortcuts out of the box:

  • Navigation: Arrow Right / Arrow Left.
  • Zoom Control: Ctrl + and Ctrl - to adjust font size instantly.
  • UI Toggle: Space to show/hide bars, Esc to hide.

📱 Mobile Specifics #

  • Haptic Feedback: Integrated native vibrations for interactive settings.
  • Hardware Controls: Direct control over screen brightness and "Keep Awake" (WakeLock) via the settings panel.

🔗 Event Callbacks #

Sync reading progress with your backend or analytics:

NovelReader(
  config: myConfig,
  onChapterChanged: (index) => print("User moved to chapter $index"),
  onThemeChanged: (mode) => print("Theme updated to $mode"),
  onNextChapter: () => print("User clicked next"),
)

🏗️ Architecture #

Built on Riverpod for robust state management and Shared Preferences for lightweight data persistence. The package follows a clean, modular architecture separating models, state, and specialized widgets, making it easy to extend for custom needs.


🤝 Contributing #

Contributions are welcome! If you find a bug or have a feature request, please open an issue on GitHub. Pull requests are also appreciated.



📄 License #

This project is licensed under the MIT License - see the LICENSE file for details.

0
likes
0
points
208
downloads

Publisher

unverified uploader

Weekly Downloads

A professional-grade, highly customizable Novel/Ebook reader package for Flutter. Supports vertical scroll, horizontal paging, professional themes, and full state persistence.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_riverpod, flutter_web_plugins, google_fonts, intl, json_annotation, path_provider, plugin_platform_interface, screen_brightness, scrollable_positioned_list, shared_preferences, wakelock_plus, web

More

Packages that depend on novel_reader

Packages that implement novel_reader