platformOnMessageReceived method Null safety

  1. @internal
void platformOnMessageReceived(
  1. CastMessage castMessage
)

Internal method that shouldn't be visible

Implementation

@internal
void platformOnMessageReceived(CastMessage castMessage) {
  var thisOnMessageReceived = onMessageReceived;

  if (thisOnMessageReceived == null) return;
  final namespace = castMessage.namespace ?? "";
  final message = castMessage.message ?? "";

  thisOnMessageReceived(namespace, message);
}