How nubank/nuvigator works
Main Components
a) Core Navigation Layer:
• Nuvigator Core (Central component)
• Route Management System
• Deep Link Handler
• Screen Type Manager
b) Screen Types:
• Material Screen Type
• Cupertino Screen Type
c) Integration Components:
• Flutter Navigation Bridge
• Deep Link Parser
• Nested Navigation Handler
Key Architectural Elements
• Router Hierarchy (Parent-Child relationship)
• Screen Type Abstraction
• Deep Link Processing Pipeline
• Route Registration System
Rectangle: Core Components
Hexagon: Screen Types
Diamond: Integration Points
Component Relationships
• [Flutter Navigation System]
• ↑
[Deep Link Handler] → [Nuvigator Core] ← [Route Management]
• ↓ ↓ ↓
[Deep Link Parser] [Screen Type Manager] [Route Registry]
• / \
• [Material] / \ [Cupertino]
• / \
• [Screen Types] [Nested Navigation]
Implementation Details
• Route registration flow
• Navigation request processing
• Screen type selection logic
• Deep link resolution pipeline
Additional Notes
Annotations for:
• File locations for key components
• Configuration points
• Extension mechanisms
• Testing integration points
Remember to include a section showing how the package integrates with a typical Flutter application, demonstrating the relationship between the MaterialApp, Nuvigator, and custom routes.
This architecture should reflect the project's structure as seen in the lib/src directory, where core components are separated into distinct files (deeplink.dart, nu_router.dart, nuvigator.dart, etc.), while maintaining the modularity that allows for easy extension and customization.