alive 0.0.1+2 copy "alive: ^0.0.1+2" to clipboard
alive: ^0.0.1+2 copied to clipboard

Alive client for flutter. "Real"time communication for apps. You can use it for chats or realtime events

Pub version Sponsors Contributors Discord

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 ❤

Like the project

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());
}

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());
}

Additional information #

No additional information

2
likes
110
pub points
21%
popularity

Publisher

verified publisherlivingadventures.com.co

Alive client for flutter. "Real"time communication for apps. You can use it for chats or realtime events

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, logging, web_socket_channel

More

Packages that depend on alive