rxbus

Last updated:

0 purchases

rxbus Image
rxbus Images
Add to Cart

Description:

rxbus

FlutterRxBus #
A Flutter EventBus using RxDart


GitHub |
Pub |
Usage #
1. Add to pubspec.yaml #
rxbus: latest version
copied to clipboard
2. Define Event #
Any Dart class or List or any Data can be used as an event.
class ChangeTitleEvent {
String title;

ChangeTitleEvent(this.title);
}

copied to clipboard
3. Register RxBus #
Register RxBus
import 'package:rxbus/rx_bus.dart';

RxBus.singleton.register<ChangeTitleEvent>().listen((event) {
ยทยทยท//do something
print(event.title);
});
copied to clipboard
4. Send Event #
Register listeners for specific events:
RxBus.singleton.post(ChangeTitleEvent("Changed by event"));
copied to clipboard
License #
The MIT License (MIT)

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.