DefineHook class

Annotation used to mark hook functions.

This annotation is used by the lint rule to identify hook functions and validate their usage. Functions marked with this annotation must be called within the proper context (e.g., inside a SetupWidget's setup function).

Example:

@defineHook
Signal<T> useSignal<T>(T value) {
  return useAutoDispose(() => Signal(value));
}

Constructors

DefineHook()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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