voegNodeToe method
Implementation
Future<String> voegNodeToe({String? parentId, String naam = 'Leiding'}) async {
if (_boom == null) throw StateError('Geen boom actief');
final id = DateTime.now().microsecondsSinceEpoch.toString();
final node = LeidingNode(
id: id,
naam: naam.trim(),
parentId: parentId,
invoer: Invoer.standaard(),
);
_boom = _boom!.copyWith(nodes: [..._boom!.nodes, node]);
_actiefNodeId = id;
notifyListeners();
await _slaOp();
return id;
}