agora_rtc_engine 1.0.5

  • Readme
  • Changelog
  • Example
  • Installing
  • 88

AgoraRtcEngine #

pub package

This Flutter plugin is a wapper for Agora Video SDK. provides building blocks for you to add real-time voice and video communications through a simple and powerful SDK. You can integrate the Agora SDK to enable real-time communications in your own application quickly.

Note: This plugin is still under development, and some APIs might not be available yet.

Usage #

To use this plugin, add agora_rtc_engine as a dependency in your pubspec.yaml file.

Getting Started #

  • See the example directory for a sample app using AgoraRtcEngine.
  • Or checkout this tutorial for a simple video call app using Agora Flutter SDK.

Device Permission #

Agora Video SDK requires camera and microphone permission to start video call.

Android #

Open the AndroidManifest.xml file and add the required device permissions to the file.

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- The Agora SDK requires Bluetooth permissions in case users are using Bluetooth devices.-->
<uses-permission android:name="android.permission.BLUETOOTH" />

iOS #

Open the info.plist and add:

  • Privacy - Microphone Usage Description, and add a note in the Value column.
  • Privacy - Camera Usage Description, and add a note in the Value column.

Your application can still run the voice call when it is switched to the background if the background mode is enabled. Select the app target in Xcode, click the Capabilities tab, enable Background Modes, and check Audio, AirPlay, and Picture in Picture.

Error handling #

iOS memory leak #

if your flutter channel is stable, PlatformView will cause memory leak, you can run flutter channel beta

you can refer to this pull request

Black screen #

if your MainActivity extends

please remove this line of code


you can refer to the official documents

Release crash #

it causes by code obfuscation because of flutter set android.enableR8=true by the default

Add the following line in the app/ file to prevent code obfuscation:

-keep class io.agora.**{*;}

How to contribute #

To help work on this sdk, see our contributor guide.

Change log #

1.0.5 #

  • fix iOS memory leak

1.0.4 #

  • AgoraRenderWidget use key now

1.0.3 #

  • add log functions

1.0.2 #

  • fix Android orientation bug

1.0.1 #

1.0.0 #

  • Support CDN Publish & Pull
  • Support Switch Channel
  • Update to Agora Rtc SDK 2.9.0 version.
  • deprecated methods: onUserMuteVideo onUserEnableVideo onUserEnableLocalVideo onFirstRemoteVideoDecoded onRemoteAudioTransportStats
  • add methods: switchChannel onLocalAudioStateChanged onRemoteAudioStateChanged onLocalAudioStats setLiveTranscoding addPublishStreamUrl removePublishStreamUrl addInjectStreamUrl removeInjectStreamUrl
  • enhancement RemoteVideoStats & LocalVideoStats & RtcStats

0.9.9 #

0.9.8 #

  • Add native result call.
  • Update to Agora Rtc SDK 2.8.0 version.

0.9.7 #

  • Move callback to main thread.

0.9.6 #

  • Update to Agora Rtc SDK 2.4.1 version.
  • Support encryption.
  • Adds the onLocalVideoStateChanged callback to indicate the local video state. This replaces the onCameraReady and onVideoStopped callbacks.
  • Adds the onNetworkTypeChanged callback to indicate the local network type.
  • Adds the onFirstRemoteAudioDecoded callback to report to the app that the SDK decodes first remote audio.

0.9.5 #

  • Fix onRtcStats

0.9.4 #

  • Update to Agora Rtc SDK 2.4.0 version
  • Refact setVideoEncoderConfiguration
  • Add setBeautyEffectOptions and setRemoteUserPriority

0.9.3 #

  • Added basic enumerations

0.9.2 beta #

  • Fix Android type specifiers issues

0.9.1 beta #

  • Added docs for SDK apis

0.9.0 beta #

  • Flutter for Agora Video SDK beta release


AgoraRtcEngine Example #

Demonstrates how to use the agora_rtc_engine plugin.

Getting Started #

Create an Account and Obtain an App ID #

  1. Create a developer account at
  2. In the Dashboard that appears, click Projects > Project List in the left navigation.
  3. Copy the App ID from the Dashboard to a text file. You will use this ID later when you launch the app.

Update and Run the Sample Application #

Open the main.dart file. In the _initAgoraRtcEngine() method, update YOUR APP ID with your App ID.

Future<void> _initAgoraRtcEngine() async {
  AgoraRtcEngine.create('YOUR APP ID');

Run example #

Connect device and run.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  agora_rtc_engine: ^1.0.5

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:agora_rtc_engine/agora_rtc_engine.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health suggestions

Fix lib/agora_rtc_engine.dart. (-1 points)

Analysis of lib/agora_rtc_engine.dart reported 2 hints:

line 428 col 5: 'await' applied to 'void', which is not a 'Future'.

line 1592 col 26: The declaration '_videoRenderModeFromInt' isn't referenced.

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field was unreachable.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8