markAsInteracted static method
Future<void>
markAsInteracted(
- int messageId,
- String interactedElementId, {
- required dynamic onSuccess()?,
- required dynamic onError(
- CometChatException excep
Messages elements can be marked as interacted.
messageId
The ID of the message above which all messages for a particular conversation are to be marked as read.
method could throw PlatformException with error codes specifying the cause
Implementation
static Future<void> markAsInteracted(
int messageId, String interactedElementId,
{required Function(String)? onSuccess,
required Function(CometChatException excep)? onError}) async {
try {
final result = await channel.invokeMethod('markAsInteracted',
{'messageId': messageId, "interactedElementId": interactedElementId});
if (onSuccess != null) onSuccess(result);
} on PlatformException catch (p) {
_errorCallbackHandler(null, p, null, onError);
} catch (e) {
_errorCallbackHandler(null, null, e, onError);
}
}