liveroom 0.0.6 liveroom: ^0.0.6 copied to clipboard
Super simple WebSocket Room kit
https://pub.dev/packages/liveroom
LiveRoom, Super-Simple WebSocket Room kit #
1. Server #
- setup Deno (Official Manual)
### Mac
$ curl -fsSL https://deno.land/x/install/install.sh | sh
### Windows powershell
$ irm https://deno.land/install.ps1 | iex
- create TypeScript file
main.ts
import { Liveroom } from "https://deno.land/x/liveroom/mod.ts";
const liveroom = new Liveroom();
liveroom.run();
- run
$ deno run --allow-net main.ts
2. Flutter App #
import 'package:flutter/material.dart';
import 'package:liveroom/liveroom.dart';
final liveroom = Liveroom();
void main() {
final app = LiveroomTestApp(liveroom);
runApp(app);
}
more functions
- liveroom.create(roomId: '0001');
- liveroom.join(roomId: '0001');
- liveroom.send(message: 'Hello');
- liveroom.receive((seatId, message) => print(message));
- liveroom.exit();
🎉 any issues, requests, contributions are welcomed!