lastData<T> method
Gets the last data sent to a specific topic. Returns null if no data has been sent to that topic.
Implementation
@override
T? lastData<T>({String? path, String? target}) {
var t = Topic.create<T>(path: path, target: target);
var node = _eventsMap[t];
if (node != null && node is EventNode<T>) {
// if (node.lastData is T) {
return node.lastData;
// } else {
// throw Exception('EventBus storage node($t) with broken data ');
// }
}
return null;
}