get_event_bus 1.0.0 copy "get_event_bus: ^1.0.0" to clipboard
get_event_bus: ^1.0.0 copied to clipboard

A minimal and scalable light-weight event bus library for get.dart

get_event_bus.dart #

A minimal and scalable light-weight event bus library for get.dart

pub package license stars

Quick Start #

No setup needed.

void main() {
  // fire a event
  Get.bus.fire(SomeClass());
  // listen a event
  Get.bus.on<SomeClass>((event) => Get.log(event), cancelOnError: true);
  // listen a event for once
  Get.bus.once<SomeClass>((event) => Get.log(event));
  // direct use of stream
  Get.bus.stream.listen((event) => Get.log(event), onData() => Get.log('onData'));
  // customized underlying stream
  Get.bus.streamController = PublishSubject();
  // independent use
  final bus = EventBus();
}

Feature #

  • Minimal and scalable
  • Support get.dart
  • Support all platforms
  • 100% test coverage

Maintenance #

  • Maintaining
  • Stable API

Examples #

check out

4
likes
160
points
154
downloads

Publisher

unverified uploader

Weekly Downloads

A minimal and scalable light-weight event bus library for get.dart

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, get

More

Packages that depend on get_event_bus