joinMeeting method
Joins a Zoom meeting with the specified credentials.
Requires:
meetingId: The unique identifier for the Zoom meetingmeetingPassword: The password required to join the meetingdisplayName: 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;
}
}