openVideoPlayer method Null safety

void openVideoPlayer(
  1. {required String url,
  2. VideoPlayerConfiguration? config}
)

Opens video url with the config.

Implementation

void openVideoPlayer({
  required String url,
  VideoPlayerConfiguration? config,
}) {
  final nativeMethodName = FWMethodNameUtil.convertToNativeMethod(
      FWNativeMethodName.openVideoPlayer);
  Map<String, dynamic> arg = {
    "url": url,
  };

  if (config != null) {
    arg["config"] = VideoPlayerConfigurationUtil.toJson(config);
  }

  FWMethodChannelUtil.getFirewokSDKChannel()
      .invokeMethod(nativeMethodName, arg);
}