joinMeeting method

  1. @override
Future<bool> joinMeeting({
  1. required String meetingId,
  2. required String meetingPassword,
  3. required String displayName,
})
override

Joins a Zoom meeting with the specified credentials.

Requires:

  • meetingId: The unique identifier for the Zoom meeting
  • meetingPassword: The password required to join the meeting
  • displayName: The name to be displayed for the participant

Returns a Future<bool> indicating whether joining the meeting was successful.

Handles any exceptions that might occur during the join process, printing the error to the debug console and returning false.

Implementation

@override
Future<bool> joinMeeting({
  required String meetingId,
  required String meetingPassword,
  required String displayName,
}) async {
  try {
    // Invoke the native platform's 'joinMeeting' method with the meeting details
    final result = await methodChannel.invokeMethod<bool>('joinMeeting', {
      'meetingId': meetingId,
      'meetingPassword': meetingPassword,
      'displayName': displayName,
    });
    // Return the result, defaulting to false if null
    return result ?? false;
  } catch (e) {
    // Log any errors that occur while joining the meeting
    debugPrint('Error joining Zoom meeting: $e');
    return false;
  }
}