Are there any sort of event support in Dart?
-
12-12-2019 - |
Question
I would like to fire events in my classes to let other classes get notified, but having tried looking into the documentation I can't seem to find anything.
Should I create my own Observable class that has this?
Solution
The Dart event model is mainly focused on HTML DOM events. There are several community efforts that implement a more generalized event model:
Dartlib Event Model (Kevin Moore)
DartNet Event Model (My project), .net inspired
In the Buckshot library there is also an ObservableList implementation that uses the event model, but this isn't the only ObservableList I've seen floating around so you may find something more suitable to your needs. :)
OTHER TIPS
Follow this bug for updates: http://code.google.com/p/dart/issues/detail?id=1873