Setup - Flutter
Flutter SDK is client for real-time communication for android and ios devices. It inherits the same terminology as all other SDKs does.
Minimum OS/SDK versions
- Android:
minSdkVersion24 (Android 7.0) or higher, on arm64-v8a and armeabi-v7a devices. - iOS: 18.0 or higher. Build with Flutter 3.41 or later, with Swift Package Manager turned on.
The SDK runs on Android and iOS only. Web, macOS and Windows are not supported.
Use this package as a library
Step 1: Add this package in your flutter project
Run this command:
flutter pub add videosdk:^5.0.0
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:
videosdk: ^5.0.0
Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
Upgrading from v4.x.x? Remove videosdk_webrtc, and videosdk_media_effects if you use it, from your pubspec.yaml and your imports. Then follow the migration guide.
Step 2: Set up Android
Set minSdk to 24 or higher in android/app/build.gradle.kts.
The SDK ships its native libraries for arm64-v8a and armeabi-v7a, so it does not run on x86 and x86_64 emulators. Test on an ARM device or an arm64 emulator image. To keep Google Play from offering your app to other devices, add an ABI filter in the same file:
android {
defaultConfig {
minSdk = 24
ndk {
abiFilters += listOf("arm64-v8a", "armeabi-v7a")
}
}
}
In a Groovy android/app/build.gradle, write minSdkVersion 24 and ndk { abiFilters 'arm64-v8a', 'armeabi-v7a' } instead.
Then add this line to android/gradle.properties. Without it, Flutter adds its own ABIs to the filter and yours has no effect. It needs Flutter 3.41 or later.
disable-abi-filtering=true
Flutter shrinks every Android release build with R8. The SDK loads its videosdk.org classes by name, so R8 removes or renames them unless you keep them. Add these rules to android/app/proguard-rules.pro, and create the file if your app does not have one:
-keep class videosdk.org.** { *; }
-dontwarn videosdk.org.**
Keep the -dontwarn line, because the keep rule alone fails the build with a missing-class error.
Step 3: Set up iOS
The iOS plugin ships as a Swift Package, so it needs Flutter 3.41 or later with Swift Package Manager turned on. Turn it on for your project in your app's pubspec.yaml:
flutter:
config:
enable-swift-package-manager: true
Or run flutter config --enable-swift-package-manager on every machine that builds your app, including CI.
Set your app's iOS deployment target to 18.0 or higher. In Xcode, open ios/Runner.xcworkspace, select the Runner target and set Minimum Deployments to 18.0. If your project has an ios/Podfile, set platform :ios, '18.0' there too.
The SDK runs in the iOS Simulator only on a Mac with Apple silicon.
Step 4: Set up permissions
Declare the CAMERA and RECORD_AUDIO permissions in android/app/src/main/AndroidManifest.xml, and add NSCameraUsageDescription and NSMicrophoneUsageDescription to ios/Runner/Info.plist. Without the Info.plist keys, permission requests on iOS report the permission as denied. Integrate Flutter SDK lists every permission the SDK uses.
On Android, the SDK does not ask the user for camera and microphone permission. Call VideoSDK.requestPermissions() before you join a room.
Step 5: Import it
Now in your Dart code, you can use:
import "package:videosdk/videosdk.dart";
Got a Question? Ask us on discord

