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
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
Using the ZegoUIKitPrebuiltCall in your project
- Go to ZEGOCLOUD Admin Console , get the
appID
andappSign
of your project. - Specify the
userID
anduserName
for connecting the Call Kit service. - Create a
callID
that represents the call you want to make. userID
andcallID
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
Now, you can make a new call by navigating to this CallPage
.
Configure your project
Android
iOS
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.
Related guide and resources
Sample Code
Click here to get the complete sample code.
API reference
Click here for detailed explanations of all APIs.