How sayansr26/epub_viewer_new works
Main Components Identification
The system should be represented as a Flutter Plugin Architecture with the following key components:
a) Flutter Layer (Dart)
• Main Plugin Interface
• Model Layer
• Utility Layer
b) Platform-Specific Implementations
• iOS Implementation (Swift/Objective-C)
• Android Implementation (Java)
• Desktop Support Layer (Windows/Linux/MacOS)
c) External Framework
• FolioReader Integration
Level 1 (Top): Flutter Application Integration Point
Level 2: Core Plugin Interface (epub_viewer_new.dart)
Level 3: Platform Channels and Implementation
Level 4: Platform-Specific Readers
Component Relationships
a) Main Flow:
• Flutter App → epub_viewer_new.dart (Plugin Interface)
• Plugin Interface → Platform Channel
• Platform Channel → Native Implementations
• Native Implementations → FolioReader Framework
b) Supporting Flows:
• Model Layer ↔ Plugin Interface
• Utility Layer ↔ Plugin Interface
• EpubViewerPlugin (Main Interface)
• EpubLocator Model
• Platform-Specific Readers
• Configuration Handlers
• Reading Time Tracking
• Location Management
• Asset Loading
• Distraction-Free Mode (Android-only)
Implementation Details to Highlight
• Method Channel Communication
• Platform-Specific Configurations
• Data Model Serialization
• Feature Availability per Platform