getMethodFromName method Null safety

HMSPreviewUpdateListenerMethod getMethodFromName(
  1. String name
)

Implementation

static HMSPreviewUpdateListenerMethod getMethodFromName(String name) {
  switch (name) {
    case 'preview_video':
      return HMSPreviewUpdateListenerMethod.onPreviewVideo;
    case 'on_error':
      return HMSPreviewUpdateListenerMethod.onError;
    default:
      return HMSPreviewUpdateListenerMethod.unknown;
  }
}