hernoemNode method

Future<void> hernoemNode(
  1. String nodeId,
  2. String naam
)

Implementation

Future<void> hernoemNode(String nodeId, String naam) async {
  final idx = _nodeIdx(nodeId);
  if (idx < 0) return;
  final updated = List<LeidingNode>.from(_boom!.nodes);
  updated[idx] = updated[idx].copyWith(naam: naam.trim());
  _boom = _boom!.copyWith(nodes: updated);
  notifyListeners();
  await _slaOp();
}