How clevertap/clevertap-flutter works
Main Components
a) Client-Side Components:
• Flutter Application Layer
• Platform-Specific Implementations (Android/iOS/Web)
• Background Processing Components
• Event Handling System
b) Integration Components:
• CleverTap Core Services Connection
• Push Notification System
• Analytics Pipeline
• Template Management System
Top Level (Flutter Application Layer):
• Flutter Plugin Interface
• clevertap_plugin.dart (Main Plugin Entry)
Middle Level (Platform Channels):
• Platform-Specific Implementations
• Android Implementation
• iOS Implementation
• Web Implementation
Bottom Level (Native Services):
• CleverTap Core Services
• Analytics
• Push Notifications
• User Engagement Features
Key Elements to Highlight
a) Communication Flows:
• Event flow from app to CleverTap services
• Background processing paths
• Rectangle: Core components
• Rounded Rectangle: Platform-specific implementations
• Hexagon: External services
• Circle: Event handlers
Specific Implementation Details
For Android:
• CleverTapPlugin.java as the main entry point
• CleverTapEventEmitter for event handling
• Background isolate executor system
For iOS:
• CleverTapPlugin.m as the main bridge
• Template presenter system
• Custom template handling
For Web:
• Web-specific implementation through clevertap_plugin_web.dart
Important Relationships
• Event flow from Flutter to native platforms
• Background processing system
• Push notification handling
• Template management system
• Analytics data flow
Additional Elements
• Different component types
• Background processing paths
• Integration points with CleverTap services
Technical Details to Note
• Platform channel communication
• Event handling system
• Background processing capability
• Push notification integration
• Custom template support
• Analytics tracking flow
This structure will provide a clear understanding of how the plugin bridges Flutter applications with CleverTap's services across different platforms while maintaining a clean architectural separation of concerns.