events_emitter 0.0.1 copy "events_emitter: ^0.0.1" to clipboard
events_emitter: ^0.0.1 copied to clipboard

outdated

A Event-based system, inspired by NodeJS's Event Emitter. Uses generic types to allow for multiple data types, while still being intuitive. Based on JavaScript and suitable for Dart and Flutter.

example/lib/main.dart

import 'package:events_emitter/events_emitter.dart';

void main() {
  EventEmitter events = EventEmitter();

  events.on('message', (String data) => print('String: $data'));
  events.on('message', (int data) => print('Integer: $data'));

  events.emit('message', 'Hello World');
  events.emit('message', 42);

  // [Output]
  // String: Hello World
  // Integer: 42
}
17
likes
0
points
30.6k
downloads

Publisher

verified publisherdrafakiller.com

Weekly Downloads

A Event-based system, inspired by NodeJS's Event Emitter. Uses generic types to allow for multiple data types, while still being intuitive. Based on JavaScript and suitable for Dart and Flutter.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_lints

More

Packages that depend on events_emitter