snapshotStream property

Stream<AppResourceSnapshot> get snapshotStream

A broadcast stream of AppResourceSnapshot events, fed by the overlay.

Listen to this from anywhere to react to new monitoring data:

RuntimeInsightOverlayController.instance.snapshotStream.listen((s) {
  print('CPU: ${s.cpuPercent}');
});

Implementation

Stream<AppResourceSnapshot> get snapshotStream => _snapshotController.stream;