diff --git a/lib/providers/todo_provider.dart b/lib/providers/todo_provider.dart index f7e02e0..cd18f18 100644 --- a/lib/providers/todo_provider.dart +++ b/lib/providers/todo_provider.dart @@ -21,7 +21,7 @@ class ToDoProvider with ChangeNotifier { notifyListeners(); } - // Sortierlogik für Deadline + // sorting logic for deadline void sortByDeadline() { _todos.sort((a, b) { if (a.deadline == null) return 1; // Tasks without deadline should come last @@ -31,14 +31,14 @@ class ToDoProvider with ChangeNotifier { notifyListeners(); } - // Sortierlogik für Priorität + // sorting logic for priority void sortByPriority() { Map priorityMap = {'High': 1, 'Medium': 2, 'Low': 3}; _todos.sort((a, b) => priorityMap[a.priority]!.compareTo(priorityMap[b.priority]!)); notifyListeners(); } - // Sortierlogik für Status + // sorting logic for staus void sortByStatus() { _todos.sort((a, b) => a.isCompleted ? 1 : -1); // Uncompleted first notifyListeners(); diff --git a/lib/screens/todo_list_screen.dart b/lib/screens/todo_list_screen.dart index 73f7fd2..13e76ec 100644 --- a/lib/screens/todo_list_screen.dart +++ b/lib/screens/todo_list_screen.dart @@ -52,7 +52,7 @@ class ToDoListScreen extends StatelessWidget { itemCount: todoProvider.todos.length, itemBuilder: (context, index) { var todo = todoProvider.todos[index]; - String formattedDate = formatDate(todo.deadline); // Formatierung des Datums + String formattedDate = formatDate(todo.deadline); // date formatting return ListTile( title: Text( todo.title,