0 purchases
alive
Alive is a library inspired by Socket.IO and Laravel Echo for enabling "real"-time communication on multiple platforms. The current implementation works on Dart/Flutter
Help me reach more people! Increasing alive community will make the package more stable with your feedback ❤
Features #
Current features:
✅ Message broadcasting
✅ Message channels
On road-map:
❌ Private channels
❌ Authentication
Getting started #
Before using the library, be sure you already have a server instance running
Usage #
Connect to server and listen to broadcast messages
import 'package:alive/alive.dart';
import 'package:flutter/material.dart';
late Client client;
void main() {
client = Client(url: 'ws://localhost:4000/');
client.connect();
client.on().listen((message) => print(message.data));
runApp(const MyApp());
}
copied to clipboard
Connect to server and listen to specific channel
import 'package:alive/alive.dart';
import 'package:flutter/material.dart';
late Client client;
void main() {
client = Client(url: 'ws://localhost:4000/');
client.connect();
client.subscribe('test');
client.on('test').listen((message) => print(message.data));
runApp(const MyApp());
}
copied to clipboard
Additional information #
No additional information
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.