flutter_pusher_client 0.3.1

Flutter Android iOS

A Flutter plugin to listen to events sent through pusher. Wraps the native Java and Swift libraries

Pusher Flutter Client #

pub package

An unofficial Flutter plugin that wraps pusher-websocket-java on Android and pusher-websocket-swift on iOS.

This package lets you consume events from a Pusher server. In order to use this library, you need to have a free account on http://pusher.com. After registering, you will need the application credentials for your app.

Note: This plugin is still under development, and some APIs might not be available yet. Feedback and Pull Requests are most welcome!

How to install #

  • Add to your pubspec.yaml
dependencies:
  flutter_pusher_client: ^0.1.0

Getting Started #

import 'package:flutter_pusher_client/flutter_pusher.dart';

void main() {

  var options = PusherOptions(host: '10.0.2.2', port: 6001, encrypted: false);
  FlutterPusher pusher = FlutterPusher('app', options, enableLogging: true);

  pusher.subscribe('channel').bind('event', (event) => {});
}

Lazy Connect #

Connection to the server can be delayed, so set the lazyConnect prop on the client constructor.

Development #

Generate the models and the factories: flutter packages pub run build_runner build --delete-conflicting-outputs

1
likes
85
pub points
79%
popularity

A Flutter plugin to listen to events sent through pusher. Wraps the native Java and Swift libraries

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

atandarash@gmail.com

License

MIT (LICENSE)

Dependencies

flutter, json_annotation

More

Packages that depend on flutter_pusher_client