Skip to main content
The Ant Media Server Flutter SDK enables ultra-low latency WebRTC streaming in Flutter applications. Build once and deploy to iOS, Android, and web platforms.

Installation

Add the dependency to your pubspec.yaml:
Then run:

Platform Configuration

Android Setup

Add permissions to android/app/src/main/AndroidManifest.xml:
Set minimum SDK version in android/app/build.gradle:

iOS Setup

Add permissions to ios/Runner/Info.plist:
Set minimum iOS version in ios/Podfile:

Web Setup

No additional configuration needed for web. WebRTC is natively supported in modern browsers.

Basic Usage

Import the SDK

Initialize the SDK

Publishing a Stream

Playing a Stream

Conference Room

Join a multi-party conference room:

Camera Controls

Control camera and media settings:

Data Channels

Send and receive real-time data:

State Management

Handle SDK state changes:

Configuration Options

Media Constraints

STUN/TURN Servers

Runtime Permissions

Request permissions before streaming:

Resources

Flutter SDK Repository

View source code, sample apps, and contribute on GitHub

Requirements

  • Flutter 2.0 or higher
  • Dart 2.12 or higher
  • iOS 12.0 or later
  • Android 5.0 (API level 21) or higher
  • Modern web browser for web platform
  • Ant Media Server with SSL/TLS configured
Test your application on all target platforms (iOS, Android, Web) as WebRTC behavior may vary across platforms.

Next Steps

React Native SDK

Build with React Native for cross-platform apps

Authentication

Secure streams with token authentication