createVideoMessage method Null safety

Future<NIMResult<NIMMessage>> createVideoMessage(
  1. {required String sessionId,
  2. required NIMSessionType sessionType,
  3. required String filePath,
  4. int? fileSize,
  5. required int duration,
  6. required int width,
  7. required int height,
  8. required String displayName,
  9. NIMNosScene nosScene = NIMNosScenes.defaultIm}
)

Create a video message.

Implementation

static Future<NIMResult<NIMMessage>> createVideoMessage(
    {required String sessionId,
    required NIMSessionType sessionType,
    required String filePath,
    int? fileSize,
    required int duration,
    required int width,
    required int height,
    required String displayName,
    NIMNosScene nosScene = NIMNosScenes.defaultIm}) async {
  var message = NIMMessage.videoEmptyMessage(
      sessionId: sessionId,
      sessionType: sessionType,
      filePath: filePath,
      fileSize: fileSize,
      duration: duration,
      width: width,
      height: height,
      displayName: displayName,
      nosScene: nosScene);
  return NimCore.instance.messageService._createMessage(message: message);
}