Giter Site home page Giter Site logo

kamlesh71 / laravel_flutter_pusher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from olubunmitosin/laravel_flutter_pusher

0.0 0.0 0.0 77 KB

An easy pusher package for use with Laravel Echo. Supports Null satefy

License: MIT License

Ruby 4.88% C 0.25% Objective-C 1.32% Java 45.60% Kotlin 0.27% Dart 20.67% Swift 27.01%

laravel_flutter_pusher's Introduction

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 https://pusher.com. 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
dependencies:
  laravel_flutter_pusher: ^0.0.4

Getting Started

import 'package:laravel_flutter_pusher/laravel_flutter_pusher.dart';

void main() {

  var options = PusherOptions(
          host: '10.0.2.2',
          port: 6001,
          encrypted: false,
          cluster: 'eu'
      );
  
      LaravelFlutterPusher pusher = LaravelFlutterPusher('app_key', options, enableLogging: true);
      pusher
          .subscribe('channel')
          .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.

android/app/build.gradle:

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

android/app/proguard-rules.pro:

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

Development

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

laravel_flutter_pusher's People

Contributors

kamlesh71 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.