sendCustomMessage method

Future<String> sendCustomMessage({
  1. String? toUserId,
  2. String? groupId,
  3. required String data,
  4. String customExtension = '',
  5. String description = '',
})

Implementation

Future<String> sendCustomMessage({
  String? toUserId,
  String? groupId,
  required String data,
  String customExtension = '',
  String description = '',
}) {
  if ((toUserId == null || toUserId.isEmpty) &&
      (groupId == null || groupId.isEmpty)) {
    throw ArgumentError('provide toUserId or groupId');
  }
  return _requireLoggedIn().sendCustomMessage(
    toUserId: toUserId,
    groupId: groupId,
    data: data,
    customExtension: customExtension,
    description: description,
  );
}