flutter_eventemitter 0.1.1

Flutter Android iOS web

Dependency free publish/subscribe(pub/sub) for dart&flutter.

eventemitter #

Dependency free publish/subscribe(pub/sub) for dart&flutter.

How to use #

Open the pubspec.yaml file, and add eventemitter: unde dependencies:

  dependencies:
    flutter:
      sdk: flutter
    # ...
    # ...
    eventemitter: ^0.1.3

install it from terminal: Run flutter packages get

Example #

String token = EventEmitter.subscribe('topic', (data) {
  // receive 2
  print(data);
});

// publish is async function
EventEmitter.publish('topic', 1)
EventEmitter.publishSync('topic', 2)
EventEmitter.unsubscribe(token);

1
likes
90
pub points
76%
popularity

Dependency free publish/subscribe(pub/sub) for dart&flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

sfe.oyx@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_eventemitter