sendTextMessage method
Implementation
Future<String> sendTextMessage({
String? toUserId,
String? groupId,
required String text,
}) async {
if (!_loggedIn) {
throw StateError('login required');
}
if ((toUserId == null || toUserId.isEmpty) &&
(groupId == null || groupId.isEmpty)) {
throw ArgumentError('provide toUserId or groupId');
}
return _adapter!.sendTextMessage(
toUserId: toUserId,
groupId: groupId,
text: text,
);
}