Laravel Flutter Pusher

pub package

An unofficial Flutter plugin that wraps pusher-websocket-java on Android and pusher-websocket-swift on iOS. This is a continued plugin for Flutter Pusher Client

This package lets you consume events from a Pusher server. In order to use this library, you need to have a free account on After registering, you will need the application credentials for your app. NOTE This package requires json_annotation : ^4.0.0

How to install

  • Add to your pubspec.yaml
  laravel_flutter_pusher: ^0.0.4

Getting Started

import 'package:laravel_flutter_pusher/laravel_flutter_pusher.dart';

void main() {

  var options = PusherOptions(
          host: '',
          port: 6001,
          encrypted: false,
          cluster: 'eu'
      LaravelFlutterPusher pusher = LaravelFlutterPusher('app_key', options, enableLogging: true);
          .bind('event', (event) => log('event =>' + event.toString()));

Lazy Connect

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

R8/Proguard code obfuscation

If you have enabled code obfuscation with R8 or proguard, you need to add the following rule.


buildTypes {
  release {
    minifyEnabled true
    proguardFiles getDefaultProguardFile('proguard-android.txt'), ''


-keep class com.github.olubunmitosin.laravel_flutter_pusher.** { *; }


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