hotreloader
4.4.0, released 8 months ago by vegardit.com
Automatic hot code reloader for Dart projects that applies file changes to the running process.
What it does
Monitors the source files of a Dart project on the local file system for changes. Automatically applies code changes to the running Dart process using the Dart VM's hot reload capabilities.
AI-written summary of version 4.4.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to enable hot reload for non-Flutter Dart projects (such as command-line tools or servers).
- You want faster iteration cycles during backend or CLI Dart development.
Skip it when
- You are building standard Flutter apps, which already have built-in hot reload support.
- Running in production environments.
Strengths
- Automates hot reloading for plain Dart processes.
- Supports watching dependencies based on package graph and monorepos.
- Configurable debounce intervals and hooks for before and after reload.
Weaknesses
- Requires the Dart VM service to be enabled via command-line flags.
- Development-only utility not intended for production usage.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 5
Add hotreloader as a dev dependency and start your Dart program with the --enable-vm-service flag.
import 'package:hotreloader/hotreloader.dart';
Future<void> main(List<String> args) async {
final reloader = await HotReloader.create();
// your code
reloader.stop();
}Alternatives
Packages that do the same job and could replace hotreloader.
- dart_style
Provides an API and CLI to format Dart source code automatically.
89Compare - source_span
Standard representation for source code locations, spans, and human-friendly error messages.
84Compare - rename
CLI tool to rename Flutter app name and bundle identifier across platforms.
61Compare - import_sorter
Automatically sorts Dart imports alphabetically and groups them by type
50Compare
Works with
Packages commonly used together with hotreloader: ones it builds on, ones built on it, and its own family.
- vm_servicehotreloader depends on itA library to communicate with a service implementing the Dart VM service protocol.
- watcherhotreloader depends on itMonitors file system changes and notifies when files are added, removed, or modified.
- logginghotreloader depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- stream_transformhotreloader depends on itExtension methods adding common stream transform operators
- lean_builderBuilt on hotreloaderLean Builder: a fast, efficient Dart build system for code generation
- custom_lint_builderBuilt on hotreloaderA package to help writing custom linters.
- shelf_hotreloadBuilt on hotreloaderWrapper to easily enable hot-reload for shelf applications.
- noctermBuilt on hotreloaderFramework for building terminal user interfaces with Flutter‑like components and hot reload.