hideNode method

void hideNode(
  1. String nodeId, {
  2. bool removeRelations = true,
})

Implementation

void hideNode(String nodeId, {bool removeRelations = true}) {
  _graph.removeNode(nodeId);
  if (removeRelations) {
    final relationsTo = _graph.getRelationsTo(nodeId).toList(growable: false);
    for (final relation in relationsTo) {
      hideRelation(relation.id);
    }
    final relationsFrom =
        _graph.getRelationsFrom(nodeId).toList(growable: false);
    for (final relation in relationsFrom) {
      hideRelation(relation.id);
    }
  }
  notifyListeners();
}