AgoraEventHandlers constructor Null safety

AgoraEventHandlers(
  1. {dynamic userJoined(
    1. int uid,
    2. int elapsed
    )?,
  2. dynamic joinChannelSuccess(
    1. String channel,
    2. int uid,
    3. int elapsed
    )?,
  3. dynamic onError(
    1. ErrorCode errorCode
    )?,
  4. dynamic activeSpeaker(
    1. int uid
    )?,
  5. dynamic leaveChannel(
    1. RtcStats stats
    )?,
  6. dynamic localAudioStateChanged(
    1. AudioLocalState state,
    2. AudioLocalError error
    )?,
  7. dynamic localVideoStateChanged(
    1. LocalVideoStreamState localVideoState,
    2. LocalVideoStreamError error
    )?,
  8. dynamic remoteAudioStateChanged(
    1. int uid,
    2. AudioRemoteState state,
    3. AudioRemoteStateReason reason,
    4. int elapsed
    )?,
  9. dynamic remoteVideoStateChanged(
    1. int uid,
    2. VideoRemoteState state,
    3. VideoRemoteStateReason reason,
    4. int elapsed
    )?,
  10. dynamic tokenPrivilegeWillExpire(
    1. String token
    )?,
  11. dynamic userOffline(
    1. int uid,
    2. UserOfflineReason reason
    )?}
)

Implementation

AgoraEventHandlers({
  this.userJoined,
  this.joinChannelSuccess,
  this.onError,
  this.activeSpeaker,
  this.leaveChannel,
  this.localAudioStateChanged,
  this.localVideoStateChanged,
  this.remoteAudioStateChanged,
  this.remoteVideoStateChanged,
  this.tokenPrivilegeWillExpire,
  this.userOffline,
});