removeFunction method
void
removeFunction(
{ - required String functionUuid,
})
Implementation
void removeFunction({
required String functionUuid,
}) {
if (canvasController.currentCanvasListenable.value.functionUuid ==
functionUuid) {
canvasController.currentCanvas = projectModel.functionsCanvas.first;
}
projectModel.functionsCanvas.remove(projectModel.functionsCanvas
.firstWhere((element) => element.functionUuid == functionUuid));
canvasController.functionsListListenable.value =
projectModel.functionsCanvas.where((element) => true).toList();
onProjectChange?.call(projectModel);
}