Rate this page:

Flutter

This section will help you to start building an application on Flutter SDK with Voximplant.

Add Flutter SDK to your project

Copy URL

Use this package as a library.

1. Depend on it

Run this command:
With Flutter:

$ flutter pub add flutter_voximplant

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  flutter_voximplant: ^3.12.0

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

2. Import it

Now in your Dart code, you can use:

import 'package:flutter_voximplant/flutter_voximplant.dart';

Get started with Flutter SDK for iOS

Copy URL

Add the following entry to your Info.plist file, located in /ios/Runner/Info.plist:

<key>NSMicrophoneUsageDescription</key>
<string>Microphone is required to make voice calls</string>
<key>NSCameraUsageDescription</key>
<string>Camera is required to make video calls</string>

This entry allows your app to access the microphone and cameras.

Get started with Flutter SDK for Android

Copy URL

It is required to add Java 8 support. Open android/app/build.gradle file and add the following lines to ‘android’ section:

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

Initialize the SDK

Copy URL

Client is the main class of the SDK that provides access to Voximplant’s functions, the Voximplant().getClient() method is used to get its instance:

getClient

getClient

Connect to the Voximplant cloud and log in

Copy URL

The VIClient.getClientState() method is used to get the current state of connection to the Voximplant cloud and perform the actions according to it.

Connection node notice

When initializing and connecting the SDK to the Voximplant cloud, you need to specify the node to connect to. Your node is bound to your Voximplant account.

To find which node your account belongs to, log in to your control panel and see the Credentials for working with API, SDK, SIP section on the main dashboard.

Connect and log in

Connect and log in

Start implementing functionality

Copy URL

Now you have your application and SDK set up and successfully connected to the Voximplant cloud. To start implementing desired functionality, such as calls, conferences, messages, and more, go to the Guides section of our documentation and pick the features you need.

Flutter SDK demos

Copy URL

Implement the desired functionality by following step-by-step Guides or download and test our latest Flutter SDK here:

  • Audio call: Demonstrates the voice call functionality of the Voximplant Flutter SDK. Using it, you can make and receive voice calls, mute audio during a call, put a call on hold, and many more.

  • Video call: Demonstrates the basic video call functionality of the Voximplant Flutter SDK. Using it, you can make and receive video calls, start and stop sending video during a call, put a call on hold, and many more.