HotReloader class
A utility class that watches the filesystem for changes, and starts new instances of an Angel server.
Constructors
-
HotReloader(FutureOr<
Angel> generator(), Iterable paths, {Duration timeout, String vmServiceHost = 'localhost', int vmServicePort = 8181, bool enableHotkeys = true}) -
Initializes a hot reloader that proxies the server created by
generator
. [...]
Properties
- enableHotkeys → bool
-
If
true
(default), then developers canpress 'r' to reload
the application on-the-fly. [...]final -
generator
→ FutureOr<
Angel> Function() -
Invoked to load a new instance of
Angel
on file changes.final - hashCode → int
-
The hash code for this object. [...]
read-only, inherited
-
onChange
→ Stream<
WatchEvent> -
Fires whenever a file change. You might consider using this to trigger
page reloads in a client.
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- timeout → Duration
-
The maximum amount of time to queue incoming requests for if there is no
server
available. [...]read-only - vmServiceHost → String
-
The Dart VM service host. [...]
final
- vmServicePort → int
-
The port to connect to the Dart VM service. [...]
final
Methods
-
close(
) → Future -
handleRequest(
HttpRequest request) → Future -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
sendError(
HttpRequest request, int status, String title_, dynamic e) → void -
startServer(
[dynamic address, int port]) → Future< HttpServer> - Starts listening to requests and filesystem events.
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited