simplewebrtc_flutter_sdk 0.0.26

  • Readme
  • Changelog
  • Example
  • Installing
  • 67

simplewebrtc_flutter_sdk #

A new flutter plugin project.

Getting Started #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

0.0.15 #

  • Set connectionState after Websocket is closed

0.0.18 #

  • Add extra logging on connection state

0.0.19 #

  • Fix useSpeakerPhone(false)

0.0.20 #

  • Add usingSpeakerphone state bool

0.0.21-pre #

  • Add mediaStarted state bool which is set on updates after mediaConnected
  • Stricter cleanup of peer connections when joining a room, leaving a room, when peers go offline
  • Additional logging for visibility into the connection state on messy/multiple joins

0.0.23-pre #

  • Add leaveAllRooms()

0.0.26 #

  • Refactor state management
  • Fix websocket reconection state


import 'package:flutter/material.dart';
import 'dart:async';
import 'package:simplewebrtc_flutter_sdk/simplewebrtc_flutter_sdk.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  _MyAppState createState() => _MyAppState();

class _MyAppState extends State<MyApp> {
  SimpleWebRTCSDK sdk;

  void initState() {

  Future<void> initSDK() async {
    this.sdk = new SimpleWebRTCSDK(
      configUrl: "-- CHANGE ME --",
      proxyUrl: "-- CHANGE ME --"

    this.sdk.onConnectionState = (event) {
      print("Connection change: $event");
    this.sdk.onRoomState = (event) {
      print("Room change: $event");
    this.sdk.onPeerState = (event) {
      print("Peer change: $event");
    this.sdk.onRemoteMediaAdded = (event) {
      print("Remote media added: $event");
    this.sdk.onRemoteMediaRemoved = (event) {
      print("Removed media removed: $event");

    await this.sdk.connect();
    await this.sdk.joinRoom("-- CHANGE ME --");

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        body: Center(
          child: Text('Running\n'),

Use this package as a library

1. Depend on it

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

  simplewebrtc_flutter_sdk: ^0.0.26

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:simplewebrtc_flutter_sdk/simplewebrtc_flutter_sdk.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 Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:simplewebrtc_flutter_sdk/simplewebrtc_flutter_sdk.dart] that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because of import path [package:simplewebrtc_flutter_sdk/simplewebrtc_flutter_sdk.dart] that declares support for platforms: android, ios

Package does not support Flutter platform web

Because of import path [package:simplewebrtc_flutter_sdk/simplewebrtc_flutter_sdk.dart] that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because of import path [package:simplewebrtc_flutter_sdk/simplewebrtc_flutter_sdk.dart] that declares support for platforms: android, ios

Package not compatible with SDK dart

because of import path [simplewebrtc_flutter_sdk] that is in a package requiring null.

Health issues and suggestions

Document public APIs. (-1 points)

74 out of 74 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/simplewebrtc_flutter_sdk.dart.

Run flutter format to format lib/simplewebrtc_flutter_sdk.dart.

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 is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
flutter 0.0.0
http ^0.12.0 0.12.1
json_rpc_2 ^2.1.0 2.2.1
simplewebrtc_flutter_webrtc_shim ^0.2.9 0.2.9
web_socket_channel ^1.1.0 1.1.0
Transitive dependencies
async 2.4.1
charcode 1.1.3
collection 1.14.12 1.14.13
convert 2.1.1
crypto 2.1.5
http_parser 3.1.4
meta 1.1.8
path 1.7.0
pedantic 1.9.0 1.9.1
sky_engine 0.0.99
source_span 1.7.0
stack_trace 1.9.5
stream_channel 2.0.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies