# Agora Flutter Quickstart and the lifecycle of a video call

> Agora Flutter Quickstart shows how an Android or iOS call screen connects channel events to native video surfaces. The sample uses the Agora RTC 5.x API and a Dart 2 SDK range.

**AgoraIO-Community/Agora-Flutter-Quickstart** — Quickstart guide for the Agora Flutter SDK(Android/iOS)

- Repository: https://github.com/AgoraIO-Community/Agora-Flutter-Quickstart
- Stars: 507 · Forks: 183
- Language: Dart
- License: MIT
- Published: 2026-11-24 · Updated: 2026-11-24 · Language: en
- Canonical page: https://hysenlabs.com/projects/agoraio-community-agora-flutter-quickstart

## A sample built around Agora RTC 5.x

Agora Flutter Quickstart demonstrates how a Flutter screen can host local and remote video on Android or iOS using Agora's RTC SDK. Its value is the connection between the lifecycle of the call screen and the lifecycle of the native engine. The project's pubspec.yaml declares agora_rtc_engine at ^5.3.0 and permission_handler at ^8.1.1, with a Dart SDK range from 2.12 up to, but excluding, 3.0. Read the manifest before choosing a Flutter toolchain. The README lists Flutter 1.0.0, while the package resolver uses the constraints in the manifest. A project already using Dart 3 would need to update those constraints and check the dependencies and call site together.

## How CallPage joins a channel

CallPage receives a channel name and a client role. Its initialization creates an RtcEngine instance with the configured app ID, enables video, sets the channel profile to LiveBroadcasting and applies the role selected by the caller. The page attaches callbacks before joining. It also requests encoder dimensions of 1920 by 1080. That setting is visible in the source and describes the requested configuration. The sample provides no measured video quality or network results. The join call passes the configured token with the channel name, which makes the settings file and the channel selected in the app the first two places to compare when diagnosing an unsuccessful join.

## Running the example with matching channel settings

Use an Agora developer account and obtain the project app ID as described in the repository README. Open lib/src/utils/settings.dart and inspect the actual constants. The current file defines appId and token, while the README illustrates an older uppercase name with an empty value. Replace the sample placeholders using the project's credentials for the channel you intend to try. From the sample directory, ask Flutter to resolve the dependencies declared in the manifest.

```bash
flutter pub get
```

Once dependency resolution succeeds, launch the app on an Android or iOS target selected by Flutter.

```bash
flutter run
```

Use the same channel name on two devices to exercise the remote view. Set one participant to broadcast if the aim is to see a feed on the second device. The call screen collects join, error, remote-user and first-frame events in its info panel. A join event establishes that the client entered the channel. A first-remote-frame event gives a separate check for whether the page has received video from another participant.

## Where the video layout stops

The page tracks remote user IDs in memory. A userJoined callback adds an ID and a userOffline callback removes it. The list feeds native remote surface views keyed by channel and user. A broadcaster also gets a local surface view and toolbar controls for muting the microphone, ending the call and switching camera. An audience client omits that toolbar. The layout switch handles one through four surfaces, with a container fallback for other counts. This places a visible limit on the sample grid: the broadcaster's local view consumes one of those slots. Anyone exploring a larger room needs to inspect _viewRows before treating blank output as an engine or network failure.

## Leaving the call and comparing SDK examples

Ending the call pops the Flutter route. Disposal clears the user list and calls a method that awaits leaveChannel and then destroy. That gives readers a concrete place to trace what the app does after a participant closes the screen. The same class is worth reading alongside the Agora Developer Center documentation linked from the README. This repository presents a complete sample screen using the 5.x engine API. The Developer Center provides API documentation for choosing an integration that matches the SDK version used by an existing app. Calls such as engine creation, handler registration and view construction are the ones to compare before copying the screen into a different release line. The repository's MIT license requires retaining its copyright and permission notice in copies or substantial portions of the sample.

## What the README troubleshooting examples cover

The README includes troubleshooting notes for earlier Flutter platform views, Android embedding registration and release obfuscation. Treat each as a clue tied to the environment described there. For example, the Android black-screen note discusses an activity that overrides configureFlutterEngine and whether it invokes the superclass implementation. It addresses a different stage of the app from the event log on the call screen. When a preview is blank, the useful sequence is to determine whether the screen reached engine initialization, whether the join callback arrived and whether a first remote frame was reported. That sequence also helps distinguish a missing remote broadcaster from a view layout that cannot display the current number of surfaces.

## Conclusion

Use Agora Flutter Quickstart to study the 5.x call screen and its native view lifecycle. For a Dart 3 app, compare pubspec.yaml and the engine API with the versions in your application before adapting the sample.

## FAQ

### Which Agora SDK does Agora Flutter Quickstart declare?

Its pubspec.yaml declares agora_rtc_engine at ^5.3.0.

### Where does Agora Flutter Quickstart read the app ID and token?

The constants are defined in lib/src/utils/settings.dart and consumed by CallPage.

### How many surfaces does Agora Flutter Quickstart arrange?

The sample layout handles one through four surfaces. A broadcaster's local video uses one of those slots.

## Sources

- [AgoraIO-Community/Agora-Flutter-Quickstart on GitHub](https://github.com/AgoraIO-Community/Agora-Flutter-Quickstart)
- [Issues](https://github.com/AgoraIO-Community/Agora-Flutter-Quickstart/issues)
- [License: MIT](https://github.com/AgoraIO-Community/Agora-Flutter-Quickstart/blob/master/LICENSE)
- [README](https://github.com/AgoraIO-Community/Agora-Flutter-Quickstart/blob/master/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/agoraio-community-agora-flutter-quickstart
