HookLifecycle class final

Runs a hook target with every hook that applies to it.

Constructors

HookLifecycle({required Map<String, Script> scripts, required String rootPath, required HookStack stack, required Future<int> runHook(Script hook, HookStack stack), required Console console})

Properties

console → Console
final
hashCode → int
The hash code for this object.
no setterinherited
rootPath → String
final
runHook → Future<int> Function(Script hook, HookStack stack)
Runs one hook script. stack is the stack its processes inherit.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scripts → Map<String, Script>
final
stack → HookStack
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(String target, Future<int> action(HookStack stack), {String? hooksFrom, HookOrder order = HookOrder.standard}) → Future<int>
Runs action for target between its hooks, and returns the first non-zero exit code, or 0.
toString() → String
A string representation of this object.
inherited

Operators

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