Skip to content
pubscout

peerdart

0.5.6, released 2 years ago by an unverified publisher

Simple peer-to-peer WebRTC wrapper for Dart and Flutter supporting data and media streams.

$ flutter pub add peerdart
Source repository

What it does

PeerDart provides a complete peer-to-peer API built on top of WebRTC, mirroring the PeerJS library. It enables data channels and media streaming connections between devices for mobile and web.

AI-written summary of version 0.5.6, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to build peer-to-peer data sharing or video/audio calls in Flutter.
  • You are already familiar with the PeerJS API ecosystem.

Skip it when

  • You require production-ready stability, as the library is currently in public alpha.
  • You want a traditional centralized server architecture rather than peer-to-peer.

Strengths

  • Supports both data channels and media streams.
  • Mirrors the popular PeerJS design and documentation.
  • Works on both mobile platforms and web browsers.

Weaknesses

  • Still in alpha stage under heavy development with potential bugs and missing functionality.
  • Breaking changes can happen.

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
No
Direct dependencies
5

Requires camera and audio permissions for media calls on mobile platforms, and a PeerServer connection.

final Peer peer = Peer("pick-an-id");

const conn = peer.connect("another-peers-id");

conn.on("open").listen((name) {
    conn.send("hi!");
});

Alternatives

Packages that do the same job and could replace peerdart.

Works with

Packages commonly used together with peerdart: ones it builds on, ones built on it, and its own family.