initZoom method

  1. @override
Future<List> initZoom({
  1. required ZoomOptions options,
})
override

Platform-specific implementations should set this with their own platform-specific class that extends ZoomAllInOneSdkPlatform when they register themselves. Flutter Zoom SDK Initialization function

Implementation

@override
Future<List> initZoom({required ZoomOptions options}) async {
  try {
    String jwtSignature = jwtGenerator.generate(
        key: options.clientId ?? "", secret: options.clientSecert ?? "");
    final optionsMap = <String, dynamic>{
      ZoomConstants.JWT_TOKEN: jwtSignature,
      ZoomConstants.DOMAIN: options.domain,
    };

    // Invoke method and handle the result
    final version = await methodChannel
        .invokeMethod<List>(ZoomConstants.INIT_ZOOM, optionsMap)
        .then<List>((List? value) => value ?? List.empty());

    return version;
  } catch (e) {
    throw ZoomError('Error joining meeting: $e');
  }
}