cancelCallNotification static method
Cancels a ringing call.
Pass the call's uniqueId whenever it is known: the notification id is
reused across calls, so matching on the session id is what stops the right
call from ringing when a new one has already replaced it.
Implementation
static Future<void> cancelCallNotification(int notificationId, {String? uniqueId}) async {
try {
await _channel.invokeMethod('cancelCallNotification', {
"notificationId": notificationId,
"uniqueId": uniqueId ?? "",
});
} on PlatformException catch (e) {
print("Error invoking cancelCallNotification: ${e.message}");
}
}