createChatroomRobotMessage method Null safety

Future<NIMResult<NIMChatroomMessage>> createChatroomRobotMessage(
  1. {required String roomId,
  2. required String robotAccount,
  3. required NIMRobotMessageType type,
  4. String? text,
  5. String? content,
  6. String? target,
  7. String? params}
)

Create a robot message.

Implementation

static Future<NIMResult<NIMChatroomMessage>> createChatroomRobotMessage({
  required String roomId,
  required String robotAccount,
  required NIMRobotMessageType type,
  String? text,
  String? content,
  String? target,
  String? params,
}) async {
  return NimCore.instance.chatroomService._createMessage({
    'roomId': roomId,
    'robotAccount': robotAccount,
    'robotMessageType': _robotMessageTypeMap[type],
    'text': text,
    'content': content,
    'target': target,
    'params': params,
    'messageType': 'robot',
  });
}