createTextAtMessage method

Future<Message> createTextAtMessage({
  1. required String text,
  2. required List<String> atUserIDList,
  3. List<AtUserInfo> atUserInfoList = const [],
  4. Message? quoteMessage,
  5. String? operationID,
})

Create an @ message text Input content atUserIDList Collection of userIDs being mentioned atUserInfoList Mapping of userID to nickname, used for displaying nicknames instead of IDs in the user interface quoteMessage Quoted message (the message being replied to)

Implementation

Future<Message> createTextAtMessage({
  required String text,
  required List<String> atUserIDList,
  List<AtUserInfo> atUserInfoList = const [],
  Message? quoteMessage,
  String? operationID,
}) =>
    _channel
        .invokeMethod(
          'createTextAtMessage',
          _buildParam({
            'text': text,
            'atUserIDList': atUserIDList,
            'atUserInfoList': atUserInfoList.map((e) => e.toJson()).toList(),
            'quoteMessage': quoteMessage?.toJson(),
            "operationID": Utils.checkOperationID(operationID),
          }),
        )
        .then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));