Skip to content
pubscout

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.

$ flutter pub add hotreloader
Source repository

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.

  • source_span

    Standard representation for source code locations, spans, and human-friendly error messages.

  • rename

    CLI tool to rename Flutter app name and bundle identifier across platforms.

  • import_sorter

    Automatically sorts Dart imports alphabetically and groups them by type

Works with

Packages commonly used together with hotreloader: ones it builds on, ones built on it, and its own family.