style: changed german comments to english for consistent language
parent
b2b71bf46f
commit
017fd647b1
|
@ -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<String, int> 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();
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue