in lib/src/custom_watcher_factory.dart [53:67]
DirectoryWatcher? createCustomDirectoryWatcher(String path,
{Duration? pollingDelay}) {
DirectoryWatcher? customWatcher;
String? customFactoryId;
for (var watcherFactory in _customWatcherFactories.values) {
if (customWatcher != null) {
throw StateError('Two `CustomWatcherFactory`s applicable: '
'`$customFactoryId` and `${watcherFactory.id}` for `$path`');
}
customWatcher =
watcherFactory.createDirectoryWatcher(path, pollingDelay: pollingDelay);
customFactoryId = watcherFactory.id;
}
return customWatcher;
}