flutter_peer 0.0.2 copy "flutter_peer: ^0.0.2" to clipboard
flutter_peer: ^0.0.2 copied to clipboard

A Flutter plugin that simplifies peer-to-peer communication using WebRTC, supporting signaling, media streams, and real-time events.

example/lib/main.dart

import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:flutter_peer/flutter_peer.dart';
import 'package:flutter_peer_example/textchat.dart';
import 'package:flutter_peer_example/videoChat.dart';
import 'package:uuid/uuid.dart';

void main() {
  runApp(MainApp());
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: HomePage());
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("Simple Connect Example")),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            FloatingActionButton.extended(
              heroTag: "TextChat",
              onPressed: () {
                Navigator.of(
                  context,
                ).push(MaterialPageRoute(builder: (_) => TextChat()));
              },
              label: Text("Text Chat"),
            ),
            FloatingActionButton.extended(
              heroTag: "VideoChat",
              onPressed: () {
                Navigator.of(
                  context,
                ).push(MaterialPageRoute(builder: (_) => Videochat()));
              },
              label: Text("Video Chat"),
            ),
          ],
        ),
      ),
    );
  }
}
3
likes
140
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin that simplifies peer-to-peer communication using WebRTC, supporting signaling, media streams, and real-time events.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

eventify, flutter, flutter_web_plugins, flutter_webrtc, js, plugin_platform_interface, uuid, web, web_socket_channel

More

Packages that depend on flutter_peer

Packages that implement flutter_peer