val property
override
Short alias for the current value.
This provides a more convenient way to read the signal's value:
print(count.val); // Instead of count.value
doubled = count.val * 2; // Cleaner syntax
Implementation
@override
T? get val {
if (!_isInitialized) {
_isInitialized = true;
super.emit(_initializer());
}
return super.val;
}