watcher 0.9.7+8

  • Installing
  • Versions
  • 95

A file system watcher.

It monitors changes to contents of directories and sends notifications when files have been added, removed, or modified.


  • Fix Dart 2.0 type issues on Mac and Windows.


  • Updates to support Dart 2.0 core library changes (wave 2.2). See issue 31847 for details.


  • Internal changes only, namely removing dep on scheduled test.


  • Fix an analysis warning.


  • Declare support for async 2.0.0.


  • Fix a crashing bug on Linux.


  • Narrow the constraint on async to reflect the APIs this package is actually using.


  • Fix all strong-mode warnings.


  • Fix a bug in FileWatcher where events could be added after watchers were closed.


  • Add a Watcher interface that encompasses watching both files and directories.

  • Add FileWatcher and PollingFileWatcher classes for watching changes to individual files.

  • Deprecate Use DirectoryWatcher.path instead.


  • Fix bugs where events could be added after watchers were closed.


  • Treat add events for known files as modifications instead of discarding them on Mac OS.


  • Improved support for Windows via WindowsDirectoryWatcher.

  • Simplified PollingDirectoryWatcher.

  • Fixed bugs in MacOSDirectoryWatcher

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  watcher: "^0.9.7+8"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

      import 'package:watcher/watcher.dart';
Version Uploaded Documentation Archive
0.9.7+8 May 23, 2018 Go to the documentation of watcher 0.9.7+8 Download watcher 0.9.7+8 archive
0.9.7+7 Feb 1, 2018 Go to the documentation of watcher 0.9.7+7 Download watcher 0.9.7+7 archive
0.9.7+6 Jan 5, 2018 Go to the documentation of watcher 0.9.7+6 Download watcher 0.9.7+6 archive
0.9.7+4 Sep 21, 2017 Go to the documentation of watcher 0.9.7+4 Download watcher 0.9.7+4 archive
0.9.7+3 Aug 10, 2016 Go to the documentation of watcher 0.9.7+3 Download watcher 0.9.7+3 archive
0.9.7+2 May 3, 2016 Go to the documentation of watcher 0.9.7+2 Download watcher 0.9.7+2 archive
0.9.7 Jul 16, 2015 Go to the documentation of watcher 0.9.7 Download watcher 0.9.7 archive
0.9.6 Jun 12, 2015 Go to the documentation of watcher 0.9.6 Download watcher 0.9.6 archive
0.9.5 Mar 10, 2015 Go to the documentation of watcher 0.9.5 Download watcher 0.9.5 archive
0.9.4 Jan 22, 2015 Go to the documentation of watcher 0.9.4 Download watcher 0.9.4 archive

All 53 versions...


We analyzed this package on Jun 12, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.60.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
91 / 100
Code health derived from static analysis. [more]
98 / 100
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, other

Primary library: package:watcher/watcher.dart with components: io.


  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 22 hints.

    Strong-mode analysis of lib/src/constructable_file_system_event.dart gave the following hint:

    line: 17 col: 32
    'CREATE' is deprecated and shouldn't be used.

    Strong-mode analysis of lib/src/directory_watcher/mac_os.dart gave the following hint:

    line: 247 col: 35
    'MODIFY' is deprecated and shouldn't be used.

    Similar analysis of the following files failed:

    • lib/src/directory_watcher/windows.dart (hint)
    • lib/src/file_watcher/native.dart (hint)
  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use watcher.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.20.0 <2.0.0
async >=1.10.0 <3.0.0 2.0.7
path >=0.9.0 <2.0.0 1.6.0
Transitive dependencies
collection 1.14.10
Dev dependencies
benchmark_harness ^1.0.4
test ^0.12.29
test_descriptor ^1.0.0