onModified method

StreamSubscription<FileSystemEvent> onModified(
  1. void block()
)

Calls block whenever the this file is modified. Returns StreamSubscription which allows to cancel the listener.

Implementation

StreamSubscription<FileSystemEvent> onModified(void Function() block) {
  return watch(events: FileSystemEvent.modify).listen((event) => block());
}