sendTextMessage method

Future<V2TimValueCallback<V2TimMessage>> sendTextMessage({
  1. required String text,
  2. required dynamic receiver,
  3. String? groupID,
  4. int? priority = 0,
  5. bool onlineUserOnly = false,
})

发送自定义消息

Implementation

Future<V2TimValueCallback<V2TimMessage>> sendTextMessage({
  required String text,
  required receiver,
  String? groupID,
  int? priority = 0,
  bool onlineUserOnly = false,
}) async {
  return V2TimValueCallback<V2TimMessage>.fromJson(
    _formatJson(
      await _channel.invokeMethod(
        "sendTextMessage",
        _buildParam(
          {
            "text": text,
            "receiver": receiver,
            "groupID": groupID,
            "priority": priority,
            "onlineUserOnly": onlineUserOnly,
          },
        ),
      ),
    ),
  );
}