in lib/src/custom_watcher_factory.dart [73:86]
FileWatcher? createCustomFileWatcher(String path, {Duration? pollingDelay}) {
FileWatcher? 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.createFileWatcher(path, pollingDelay: pollingDelay);
customFactoryId = watcherFactory.id;
}
return customWatcher;
}