onCallEnd property

ZegoCallEndCallback? onCallEnd
getter/setter pair

This callback is triggered when call end, you can differentiate the reasons for call end by using the event.reason, if the call end reason is due to being kicked, you can determine who initiated the kick by using the variable event.kickerUserID.

The default behavior is to return to the previous page or hide the minimize page. like following:

onCallEnd: (
    ZegoCallEndEvent event,
    /// defaultAction to return to the previous page or hide the minimize page
    VoidCallback defaultAction,
) {
  debugPrint('onCallEnd, do whatever you want');

  /// you can call this defaultAction to return to the previous page or hide the minimize page
  defaultAction.call();
}

so if you override this callback, you MUST perform the page navigation yourself to return to the previous page(easy way is call defaultAction.call())!!! otherwise the user will remain on the current call page !!!!!

You can perform business-related prompts or other actions in this callback. For example, you can perform custom logic during the hang-up operation, such as recording log information, stopping recording, etc.

Implementation

ZegoCallEndCallback? onCallEnd;