registerListener method

void registerListener(
  1. ListenerValue func
)

Set an event listener, through which users can get various status notifications from TRTCCloud

For more information, please see the definitions in TRTCCloudListener in the trtc_cloud_listener file

Implementation

void registerListener(ListenerValue func) {
  if (listener == null) {
    listener = TRTCCloudListenerObj(_channel);
  }
  listener!.addListener(func);
}