# Add ConnectionEventHandler

**URL:** <https://community.sendbird.com/t/add-connectioneventhandler/3281>\
**Category:** Flutter\
**Tags:** group-channel, chatsdk\
**Created:** [October 25, 2021, 3:17pm UTC](https://community.sendbird.com/t/add-connectioneventhandler/3281 "2021-10-25T15:17:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RicharC](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/richarc/32/1649_2.png) [@RicharC](https://community.sendbird.com/u/RicharC)\
**Post date:** [October 25, 2021, 3:17pm UTC](https://community.sendbird.com/t/add-connectioneventhandler/3281/1 "2021-10-25T15:17:49Z")

</div>

Hi…

How Is the best form to integrate ConnectionEventHandler in same Class to ChannelEventHandler.

I implemented this in my case.

```auto
class ChatProvider
    with ChangeNotifier, ChannelEventHandler, ConnectionEventHandler {
  void _sendBirdInit() {
    try {
      _sendBird = SendbirdSdk(appId: Flavor.sendbird);
      _sendBird.addChannelEventHandler("channel_events", this);
      _sendBird.addConnectionEventHandler("identification_connection", this);
    } catch (err) {
      debugPrint("SENDBIRD_INIT: $err");
    }
  }
}

```

With this code not listen connection event handler but listen two times channel event handler.

Thanks for your help

---

<div class="post-metadata">

**Author:** ![Woo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/woo/32/125_2.png) [@Woo](https://community.sendbird.com/u/Woo)\
**Post date:** [November 15, 2021, 11:43pm UTC](https://community.sendbird.com/t/add-connectioneventhandler/3281/2 "2021-11-15T23:43:54Z")

</div>

Hello @RicharC

I found a issue with this matter. I will try to fix the issue and release new version soon. Thank you for your patient.
