dart-event-bus:组件之间的发布订阅式通信

时间:2021-06-05 23:15:18
【文件属性】:
文件名称:dart-event-bus:组件之间的发布订阅式通信
文件大小:10KB
文件格式:ZIP
更新时间:2021-06-05 23:15:18
Dart 番石榴事件总线 这个库提供了一个谷歌番石榴风格的事件总线。 EventBus 允许组件之间发布订阅式的通信,而无需组件显式地相互注册(从而相互了解)。 它专为使用显式注册取代传统的进程内事件分发而设计。 它不是一个通用的发布-订阅系统,也不是用于进程间通信的。 概要 // Class is typically registered by the container. class EventBusChangeRecorder { @subscribe void recordCustomerChange(ChangeEvent e) { recordChange(e.getChange()); } } // somewhere during initialization eventBus.register(new EventBusChangeRecorder()); //
【文件预览】:
dart-event-bus-master
----test()
--------test_data.dart(1KB)
--------event_test.dart(11KB)
----LICENSE(7KB)
----.gitignore(22B)
----pubspec.yaml(398B)
----lib()
--------guava_event_bus.dart(287B)
--------src()
----README.md(3KB)

网友评论