Overview
The watcher package provides a cross-platform file system monitoring solution for Dart and Flutter applications. It efficiently tracks changes to directories, including file additions, removals, and modifications, and delivers real-time notifications. Built for performance and reliability, it supports all major platforms—Android, iOS, macOS, Windows, and Linux—making it ideal for development tools, live-reload systems, and file synchronization features. The package integrates seamlessly with Flutter via pub dependencies.
Use cases
- Live-reload during development
- File synchronization services
- Automated build processes
- Real-time file monitoring in apps
- Development tooling
Key features
- Cross-platform support
- Real-time change notifications
- Efficient file system polling
- Simple API for directory monitoring
- Lightweight and reliable
Suitable for
- Flutter developers building dev tools
- Applications requiring file system event handling
- Build and watch scripts
- Hot reload implementations
- File-based automation workflows
Considerations
- May consume system resources on large directories
- Requires proper cleanup of watchers to avoid leaks
- Platform-specific behavior may vary slightly
- Not intended for high-frequency polling without throttling
- Limited to file system events, not network or database changes