Skip to content

Commit f991227

Browse files
committed
docs: add cleanup listener docs
1 parent 82a0017 commit f991227

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/flutter-core/quickstart.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,10 @@ shown below.
246246
dyteClient.leaveRoom();
247247
```
248248

249+
### Cleanup listeners
250+
251+
Introduced in `dyte_core: 0.3.6`, `cleanAllNativeListeners()` method which needs to be called when you're done with current session of dyte meeting. It interally calls individual new clean methods for each listener `cleanNativeMeetingRoomEventsListener()`, `cleanNativeParticipantEventListener()`, `cleanNativePollListener()`, `cleanNativeRecordingListener()`, `cleanNativeStageEventsListener()`, `cleanNativeSelfParticipantEventListener()`, `cleanNativeChatListener()`, `cleanNativeDataUpdateListener()`, `cleanNativeLivestreamListener()`, `cleanNativePluginEventsListener()`.
252+
249253
By registering state observers, you receive callbacks for this action on the
250254
meeting object.
251255

@@ -261,6 +265,7 @@ class RoomStateNotifier implements DyteMeetingRoomEventsListener {
261265
262266
@override
263267
void onMeetingRoomLeaveCompleted() {
268+
dyteClient.removeMeetingRoomEventsListener(this);
264269
dyteClient.cleanupAppListeners();
265270
/// on meeting room left
266271
}

0 commit comments

Comments
 (0)