wire 0.2.0 copy "wire: ^0.2.0" to clipboard
wire: ^0.2.0 copied to clipboard

outdated

Wire is a publish-subscribe library, with static layer beneath, where responses associated with "keys" called - signals. Simplest possible API - add, remove and send.

Wire (WIP) - Pub/Sub on Strings "signals" with data container #

Dart publish-subscribe library, with static layer beneath, where responses associated with "keys" called - signals. Simplest possible API - add, remove and send. Also it has data layer, universal container (Map) with key-value, where value is a wrapper - WireData - hold dynamic value and can be listened for updates.

API #

Wire Wire.add(String signal, Function listener, [int replies = 0])
bool Wire.send(String signal, [args])
bool Wire.remove(String signal)
WireData Wire.data(String param, [dynamic value]) - optional value update object it can be function that return value

Examples #

  1. Counter (web):
  • Open IDEA
  • Select build target - Dart Web, point to example/counter/index.html
  • Run Debug
  1. API calls variations (console):
  • Open IDEA
  • Select build target - Dart Command Line App, point to example/simple/wire_api_example.dart
  • Run Debug
3
likes
0
pub points
15%
popularity

Publisher

unverified uploader

Wire is a publish-subscribe library, with static layer beneath, where responses associated with "keys" called - signals. Simplest possible API - add, remove and send.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on wire