removeNodeWhere method

void removeNodeWhere(
  1. bool test(
    1. NodeModel
    )
)

removeNodeWhere

Removes all nodes that satisfy the given condition.

Implementation

void removeNodeWhere(bool Function(NodeModel) test) {
  _notifier.value = data.copyWith(
    nodes: data.nodes.where((e) => !test(e)).toList(),
  );
}