HookExecutionEvent class

Record of a single hook execution, used for history and diagnostics.

Constructors

HookExecutionEvent({required String hookId, required String hookName, required HookType type, required HookContext context, required HookResult result, required Duration duration, Object? error, StackTrace? errorStackTrace, required DateTime timestamp})
const

Properties

context → HookContext
The context that was passed to the hook.
final
duration → Duration
How long the hook took to execute.
final
error → Object?
Error that occurred during execution, if any.
final
errorStackTrace → StackTrace?
Stack trace for the error, if any.
final
hasError → bool
Whether this execution resulted in an error.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hookId → String
ID of the hook that was executed.
final
hookName → String
Name of the hook.
final
result → HookResult
The result returned by the hook.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timestamp → DateTime
When this event was recorded.
final
type → HookType
Type of hook that was executed.
final
wasAborted → bool
Whether the hook aborted the chain.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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