createChatroomImageMessage method Null safety

Future<NIMResult<NIMChatroomMessage>> createChatroomImageMessage(
  1. {required String roomId,
  2. required String filePath,
  3. String? displayName,
  4. NIMNosScene nosScene = NIMNosScenes.defaultIm}
)

Create an image message.

Implementation

static Future<NIMResult<NIMChatroomMessage>> createChatroomImageMessage({
  required String roomId,
  required String filePath,
  String? displayName,
  NIMNosScene nosScene = NIMNosScenes.defaultIm,
}) async {
  return NimCore.instance.chatroomService._createMessage({
    'roomId': roomId,
    'filePath': filePath,
    'displayName': displayName,
    'nosScene': nosScene,
    'messageType': 'image',
  });
}