How sgusakovsky/jitsi-meet-flutter-sdk works
Main Components
• Plugin API (Dart Layer): Represented by the files in the “lib” directory (e.g., jitsi_meet_govar_flutter_sdk.dart and various supporting classes in lib/src). This layer exposes classes such as JitsiMeet, JitsiMeetConferenceOptions, and JitsiMeetEventListener which your Flutter app uses.
• Native Integrations:
• Android Implementation: Located in the “android” folder (with Kotlin files implementing native views, activities, and event stream handling).
• iOS Implementation: Found in the “ios” folder (Swift classes handling native view integration and other native functionalities).
• Example Integration: The “example” directory contains a sample Flutter application demonstrating how to integrate and use the plugin, highlighting how the plugin is used in a real-world Flutter app.
• Testing & Build Infrastructure:
• Unit and integration tests in the “test” and “example/integration_test” directories.
• Build and publish automation workflows in “.github/workflows” (e.g., publish.yml) and build scripts (update-native-sdks.sh, update-version.sh).
Relationships and Interactions
• The Flutter application (using the plugin) communicates with the Plugin API (in lib) through its public methods (e.g., join, hangUp, setAudioMuted).
• The Plugin API interacts with the native layer using method channels that forward calls from Dart to the underlying Android and iOS implementations.
• The Android and iOS directories house the native code that handles platform-specific logic, like camera/microphone permissions, screen sharing, and UI rendering of the meeting experience.
• Configuration details (such as AndroidManifest.xml and Podfile modifications) ensure that the native modules are correctly set up.
• Testing components verify both Dart layer functionality (unit tests) and the integration between Flutter and native code.
Architectural Patterns and Design Principles
• Cross-Platform Abstraction: The plugin separates platform-agnostic logic written in Dart from platform-specific implementations in Android and iOS.
• Method Channel Communication: The use of Flutter’s method channels is a core pattern where the Dart side invokes native functions and handles event callbacks.
• Modularity & Extensibility: The separation between the plugin’s core API and the sample application promotes clear modular boundaries, making it easier to update or extend specific components (such as adding new native event listeners).
Relevant Technologies/Frameworks
• Flutter/Dart – for the plugin’s public API and sample applications.
• Kotlin – for Android native integration.
• Swift – for iOS native integration.
• Android Manifest and Gradle – for Android app configuration.
• Xcode/Podspec – for iOS app configuration.
• GitHub Actions for continuous integration/continuous deployment (CI/CD).
Elements
• Clear Labels: Ensure each part of the system is named, such as “Plugin API (lib),” “Android Integration,” “iOS Integration,” “Example App,” and “CI/CD Pipeline.”
• Detailed Annotations: Indicate key actions (like “Join Meeting,” “Toggle Screen Share,” etc.) and event handling (e.g., via JitsiMeetEventListener).