originResourceWatcher property

Future<void Function()> Function(Map<String, dynamic> origin, String uri, void onUpdate(dynamic contents))? originResourceWatcher
getter/setter pair

Host hook for watching a resource on a named origin.

The live half. A device's changing value — an uptime, a temperature — reaches a composed screen only through this; without it the subtree renders the reading's label and never a number, which looks like a layout bug rather than a missing capability.

onUpdate fires with the resource's new contents each time the origin reports it changed. Returns a disposer the runtime calls on unsubscribe.

Implementation

Future<void Function()> Function(
  Map<String, dynamic> origin,
  String uri,
  void Function(dynamic contents) onUpdate,
)? originResourceWatcher;