$<T> method
- T initial, {
- String? debugLabel,
- bool equals(
- T prev,
- T next
- T guard(
- T current,
- T next
- VoidCallback? onListen,
- VoidCallback? onCancel,
Creates a Signal with ultra-short syntax.
Example:
late final count = $(0);
late final name = $<String>('');
Implementation
Signal<T> $<T>(
T initial, {
String? debugLabel,
bool Function(T prev, T next)? equals,
T Function(T current, T next)? guard,
VoidCallback? onListen,
VoidCallback? onCancel,
}) {
return Signal<T>(
initial,
debugLabel: debugLabel,
equals: equals,
guard: guard,
onListen: onListen,
onCancel: onCancel,
).bind(this);
}