liveroom 1.0.1 copy "liveroom: ^1.0.1" to clipboard
liveroom: ^1.0.1 copied to clipboard

outdated

Super simple WebSocket Room kit

Header

https://pub.dev/packages/liveroom

LiveRoom, Super-Simple WebSocket Room kit #

1. Server #

  1. setup Deno (Official Manual)
### Mac
$ curl -fsSL https://deno.land/x/install/install.sh | sh
### Windows powershell
$ irm https://deno.land/install.ps1 | iex
  1. run quick server
$ deno run --allow-net https://deno.land/x/liveroom/quick.ts

more info
https://github.com/rbdog/liveroom/blob/main/example/main.ts


2. Flutter App #

import 'package:flutter/material.dart';
import 'package:liveroom/liveroom.dart';

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

simple interfaces

  • final liveroom = Liveroom();
  • liveroom.create(roomId: '0001');
  • liveroom.join(roomId: '0001');
  • liveroom.send(message: 'Hello');
  • liveroom.receive((seatId, message) {});
  • liveroom.exit();

🎉 any issues, requests, contributions are welcomed!