tryRemoveWhere method
Remove where with error handling
Implementation
RxResult<void> tryRemoveWhere(bool Function(K key, V value) predicate) {
return RxResult.tryExecute(() {
final newMap = Map<K, V>.from(value);
final sizeBefore = newMap.length;
newMap.removeWhere(predicate);
if (sizeBefore != newMap.length) value = newMap;
}, 'remove where from map');
}