rxbus 0.0.2 copy "rxbus: ^0.0.2" to clipboard
rxbus: ^0.0.2 copied to clipboard

A Flutter EventBus using RxDart

FlutterRxBus #

A Flutter EventBus using RxDart

Pub Package Pub Package

GitHub | Pub |

Usage #

1. Add to pubspec.yaml #

  rxbus: latest version

2. Define Event #

Any Dart class or List or any Data can be used as an event.

class ChangeTitleEvent {
  String title;

  ChangeTitleEvent(this.title);
}

3. Register RxBus #

Register RxBus

import 'package:rxbus/rx_bus.dart';

RxBus.singleton.register<ChangeTitleEvent>().listen((event) {
      ···//do something
    print(event.title);
    });

4. Send Event #

Register listeners for specific events:

 RxBus.singleton.post(ChangeTitleEvent("Changed by event"));

License #

The MIT License (MIT)

1
likes
30
pub points
44%
popularity

Publisher

unverified uploader

A Flutter EventBus using RxDart

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, rxdart

More

Packages that depend on rxbus