Overview
CometChat’s Calls feature is an advanced functionality that allows you to seamlessly integrate one-on-one as well as group audio and video calling capabilities into your application. This document provides a technical overview of these features, as implemented in the Flutter UI Kit.Integration
First, make sure that you’ve correctly integrated the UI Kit library into your project. If you haven’t done this yet or are facing difficulties, refer to our Getting Started guide. This guide will walk you through a step-by-step process of integrating our UI Kit into your Flutter project. Once you’ve successfully integrated the UI Kit, the next step is to add the CometChat Calls SDK to your project. This is necessary to enable the calling features in the UI Kit. Here’s how you do it: Step 1Add Dependency
Add the following dependency to yourpubspec.yaml file:
- Dart
Step 2
Update build.gradle
If your Flutter project’s minimum Android SDK version (minSdkVersion) is below API level 24, you should update it to at least 24. To achieve this, navigate to theandroid/app/build.gradle file and modify the minSdkVersion property within the defaultConfig section.
- Groovy
If you want to use the Flutter UI Kit or enable calling support within it, you’ll need to:
- Set the
minSdkVersionto 24 in yourandroid/app/build.gradlefile.
Step 3
Update iOS Podfile
In your Podfile located atios/Podfile, update the minimum iOS version that your project supports to 12.
- DSL
Step 4
Modify UIKitSettings
To activate the calling features, you’ll need to modify the UIKitSettings usingcallingExtension and pass the key in the widget.
Example
- Dart
- Dart
Listeners
For every top-level widget you wish to receive the call events in, you need to register the CallListener listener using theaddCallListener() method.
- Dart