tryRetainWhere method
Retain where with error handling
Implementation
RxResult<void> tryRetainWhere(bool Function(T) test) {
return RxResult.tryExecute(() {
final newSet = Set<T>.from(value);
final sizeBefore = newSet.length;
newSet.retainWhere(test);
if (sizeBefore != newSet.length) value = newSet;
}, 'retain where in set');
}