![agora video call flutter agora video call flutter](https://www.flutterant.com/wp-content/uploads/2021/03/agora_ps_key-768x233.png)
In the top-left corner we will have the current user’s camera, which is similar to all the video call app layouts. On the bottom layer of the Stack will be a big view of the other user’s live camera. Inside the Scaffold widget, we will display a simple Stack. We will keep the UI as minimalist as possible. Now, the fun part is displaying the video and stats for the user and seeing it all work together.
#Agora video call flutter update#
rtcStats: Gets triggered every two seconds and returns the statistics of the callįor these four methods, we are going to set some local variables: first, a boolean to tell us whether the current user has successfully joined ( _localUserJoined) then an integer for the user ID of the remote user who joins the channel (when the user leaves the channel we will set this id back to null) and finally, we will update our local stats variable every two seconds with fresh information.Īll the logic for the app is completed.userOffline: Gets triggered when a remote user leaves the same channel that the current user is on.userJoined: Gets triggered when a remote user joins the same channel that the current user is on.
![agora video call flutter agora video call flutter](https://www.agora.io/en/wp-content/uploads/2020/09/video-calling-flutter-app-featured.png)
joinChannelSuccess: Gets triggered when the current user of the app successfully joins a channel.Agora supports a huge list of events, but we are going to use only four of them for our simple app: To do this, we call the setEventHandler method on the engine and we can define what we want to happen on specific events.
![agora video call flutter agora video call flutter](https://www.agora.io/en/wp-content/uploads/2021/03/building-your-own-audio-streaming-application-using-the-agora-flutter-sdk-5.png)
Next comes the main logic within the app: the event handler for any events that occur on the engine. We will start with a simple stateful widget layout with a Scaffold inside a Material App like this: Once again, we will be using one file to keep things as simple as possible. Now all the preconditions are set up, and we are ready to jump to the actual code.
![agora video call flutter agora video call flutter](https://www.agora.io/en/wp-content/uploads/2021/04/real-time-messaging-and-video-with-dynamic-channels-using-the-agora-flutter-sdk-featured-768x384.png)
For more information about token-based authentication in the Agora platform, see this guide: Building the App Token authentication is recommended for all RTE apps running in production environments. It is not intended for production environments. Note: This project is meant for reference purposes and development environments. In your app, create global variables named appId and token and set them to the values retrieved from Agora. There you will find your appId, and you can generate a temporary token. The first step is to create an Agora project. For this project, we will use a temporary token. The last preparation step will be to get the appId and the token so we can use Agora securely. With these packages added, your dependencies should look like this:
#Agora video call flutter how to#
In this article, we will cover how to create a simple video call application with in-call statistics. Using the Agora Flutter SDK, which can be installed with a plugin from pub.dev, you can connect people via voice, video, and other mediums. Adding video call capabilities to your current app will allow users to stay on your app longer, help connect the users to connect to one another, and increase the value that your app provides. Clearly, remote communication will continue to be a big part of our future. When the pandemic hit in 2020, remote communication became an even more vital part of the way we communicate.