logoUIKit
On this page

Quick start

TIPS
If you need the call invitation feature, the integration method is different. Please refer to this document.

Integrate the SDK

Add ZegoUIKitPrebuiltCall as dependencies

Run the following code in your project root directory :

Untitled
flutter pub add zego_uikit_prebuilt_call
1
Copied!

Import the SDK

Now in your Dart code, import the prebuilt Call Kit SDK.

Untitled
​​​​​​​​​​​​​​​​import 'package:zego_uikit_prebuilt_call/zego_uikit_prebuilt_call.dart';
1
Copied!

Using the ZegoUIKitPrebuiltCall in your project

  • Go to ZEGOCLOUD Admin Console , get the appID and appSign of your project.
  • Specify the userID and userName for connecting the Call Kit service.
  • Create a callID that represents the call you want to make.
  • userID and callID can only contain numbers, letters, and underlines (_).
  • Users that join the call with the same callID can talk to each other.
Untitled
class CallPage extends StatelessWidget {
  const CallPage({Key? key, required this.callID}) : super(key: key);
  final String callID;

  @override
  Widget build(BuildContext context) {
    return ZegoUIKitPrebuiltCall(
      appID: yourAppID, // Fill in the appID that you get from ZEGOCLOUD Admin Console.
      appSign: yourAppSign, // Fill in the appSign that you get from ZEGOCLOUD Admin Console.
      userID: 'user_id',
      userName: 'user_name',
      callID: callID,
      // You can also use groupVideo/groupVoice/oneOnOneVoice to make more types of calls.
      config: ZegoUIKitPrebuiltCallConfig.oneOnOneVideoCall(),
    );
  }
}
1
Copied!

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

Configure your project

Run & Test

Now you have finished all the steps!

You can simply click the Run or Debug to run and test your App on your device.