unsubscribeInvalidMessageReceived method
Unsubscribes the callback from the InvalidMessageReceived-Event.
The callback
needs to be exactly the same as the one used while
subscribing.
Implementation
void unsubscribeInvalidMessageReceived(Function(String, Exception) callback) {
_callbacksForInvalidMessage.remove(callback);
}