katbook_epub_reader 2.0.0 copy "katbook_epub_reader: ^2.0.0" to clipboard
katbook_epub_reader: ^2.0.0 copied to clipboard

A powerful, customizable EPUB reader for Flutter with proper hierarchical chapter support, theme customization, reading progress tracking, and image handling. Designed to replace epub_view with better [...]

example/lib/main.dart

import 'package:flutter/material.dart';

import 'homepage.dart';

/// Example of how to use the Katbook EPUB Reader package.
/// 
/// This example demonstrates:
/// - Loading EPUB from network URL
/// - Loading EPUB from assets
/// - Full reader with all callbacks
/// - Position tracking and restoration
void main() {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Katbook EPUB Reader Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        useMaterial3: true,
      ),
      darkTheme: ThemeData.dark(useMaterial3: true),
      themeMode: ThemeMode.dark,
      // Wrap with FocusScope to prevent focus-related errors on web
      builder: (context, child) {
        return FocusScope(
          autofocus: false,
          child: child ?? const SizedBox.shrink(),
        );
      },
      home: const HomePage(),
    );
  }
}
1
likes
0
points
208
downloads

Publisher

unverified uploader

Weekly Downloads

A powerful, customizable EPUB reader for Flutter with proper hierarchical chapter support, theme customization, reading progress tracking, and image handling. Designed to replace epub_view with better features.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, epubx, flutter, google_fonts, html, scrollable_positioned_list

More

Packages that depend on katbook_epub_reader