DEV Community

ZEGOCLOUD Dev
ZEGOCLOUD Dev

Posted on

Flutter CallKit: what is it, and how to use it?

Flutter UIKit SDK is a brand-new pre-built UIKits and UI Components by ZEGOCLOUD. Through it, We can complete the development of video calls, live-streaming, video conferences, and other scenarios within 10 minutes.

Image description

As shown in the figure, Flutter UIKit SDK is responsible for processing audio and video calls and the logic related to text chat, including:

  • UI and interaction of the calling module
  • Call status management
  • Audio and video data transmission You only need to implement business-related logic. For example:
  • User login registration
  • Friends List Management
  • Call billing recharge

Preparation

Implement video call
Create Project
Run the following code to create a new project.

Image description

Add ZegoUIKitPrebuiltCall as a dependency
Run the following code in your project root directory:

Image description

Add ZegoUIKitPrebuiltCall as dependency
Run the following code in your project root directory:
flutter pub add zego_uikit_prebuilt_call

Import the SDK
Now in your Dart code, import the prebuilt CallKit Flutter SDK.

Image description

Start Video Call
Use ZegoUIKitPrebuiltCall to build a Call page.

Image description

Now, you can make a call by navigating to this CallPage.

Image description

Add a call button
Add a Call button, and navigate to the CallPage.

Image description

Configure your project
Android:
If your project is created with Flutter 2.x.x, you will need to open the your_project/android/app/build.gradle file, and modify the compileSdkVersion to 33.

Image description

Add app permissions.
Open the file your_project/app/src/main/AndroidManifest.xml, and add the following code:

Image description

Prevent code obfuscation.
To prevent obfuscation of the SDK public class names, do the following:
a. In your project’s your_project > android > app folder, create a proguard-rules.pro file with the following content as shown below:

Image description

iOS:
To add permissions, open your_project/ios/Runner/Info.plist, and add the following code to the dict part:

Image description

Conclusion
It’s way easier to make a video call now than it was five or ten years ago. Additionally, their recent popularity also makes a point. In today’s market, a simple and secure video call app will definitely find its audience.

You can download the sample demo source code of this article to learn how to . If you have deeper requirements, such as streaming mix, noise reduction, censorship, etc. you can use our Core SDK.

If you have any questions, you can always consult us 24h technical support.

Top comments (0)