markAsDelivered static method
dynamic
markAsDelivered(
- BaseMessage message, {
- required dynamic onSuccess(
- String message
- required dynamic onError(
- CometChatException excep
Mark the messages for a particular conversation as delivered .
method could throw PlatformException with error codes specifying the cause
Implementation
static markAsDelivered(BaseMessage message,
{required Function(String message)? onSuccess,
required Function(CometChatException excep)? onError}) async {
try {
Map<String, dynamic> messageMap = message.toJson();
final result = await channel
.invokeMethod('markAsDelivered', {'baseMessage': messageMap});
if (onSuccess != null) onSuccess(result);
} on PlatformException catch (p) {
_errorCallbackHandler(null, p, null, onError);
} catch (e) {
_errorCallbackHandler(null, null, e, onError);
}
}