call<T> method
Creates a reactive signal hook with an initial value.
The signal persists across rebuilds and is automatically disposed when the widget is unmounted.
Parameters:
value: The initial value for the signalonDebug: Optional debug callback for reactive system debugging
Returns: A Signal that can be read and written to
Example:
setup(context, props) {
final count = useSignal(0);
final name = useSignal('Alice');
return () => Text('${name.value}: ${count.value}');
}
Implementation
Signal<T> call<T>(
T value, {
JoltDebugFn? onDebug,
}) {
return useAutoDispose(() => Signal(value, onDebug: onDebug));
}