whereNotNull method
Handle null values with a default
Implementation
RxComputed<T> whereNotNull([T? defaultValue]) {
return computed(() {
final val = value;
if (val == null) {
if (defaultValue != null) return defaultValue;
throw StateError('Value is null and no default provided');
}
return val;
});
}