SourceWatcher class

Watches the local files, and updates on events

Annotations
  • @autoequal

Constructors

SourceWatcher(String dirPath, {Iterable<String> excludePaths = const []})
Watches the local files, and updates on events
SourceWatcher.config({required String dirPath, required DirectoryWatcher watcher, Iterable<String> excludePaths = const []})
allows to set the watcher to be used only for testing

Properties

afterEvents List<OnEvent>
events to be called after all bricks are cooked
no setter
beforeEvents List<OnEvent>
events to be called before all bricks are cooked
no setter
dirPath String
the source directory of the brick, which will be watched
final
events List<OnEvent>
events to be called for each brick that gets cooked
no setter
excludePaths Iterable<String>
final
hashCode int
The hash code for this object.
no setterinherited
hasRun bool
whether the watcher has run
no setter
isRunning bool
whether the watcher is running
no setter
listener StreamSubscription<WatchEvent>?
the stream subscription for the watcher
no setter
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

addEvent(OnEvent onEvent, {bool runAfter = false, bool runBefore = false}) → void
adds event that will be called when a file creates an event
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() Future<void>
resets the watcher by stopping it and restarting it
start() Future<void>
starts the watcher
stop() Future<void>
stops the watcher
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited