Add the ability to deselect a task

This commit is contained in:
hunteraraujo
2023-09-06 12:21:30 -07:00
parent a8023c2598
commit a933f117fb
2 changed files with 8 additions and 0 deletions

View File

@@ -73,4 +73,11 @@ class TaskViewModel with ChangeNotifier {
throw ArgumentError(errorMessage);
}
}
/// Deselects the currently selected task.
void deselectTask() {
_selectedTask = null;
print("Deselected the current task.");
notifyListeners(); // Notify listeners to rebuild UI
}
}