hernoemProject method

Future<void> hernoemProject(
  1. String projectId,
  2. String nieuwNaam
)

Implementation

Future<void> hernoemProject(String projectId, String nieuwNaam) async {
  final idx = _projecten.indexWhere((p) => p.id == projectId);
  if (idx < 0) return;
  _projecten[idx] = _projecten[idx].copyWith(
    naam: nieuwNaam.trim(),
    gewijzigd: DateTime.now(),
  );
  notifyListeners();
  await _slaOp();
}