style: changed german comments to english for consistent language
parent
b2b71bf46f
commit
017fd647b1
|
@ -21,7 +21,7 @@ class ToDoProvider with ChangeNotifier {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sortierlogik für Deadline
|
// sorting logic for deadline
|
||||||
void sortByDeadline() {
|
void sortByDeadline() {
|
||||||
_todos.sort((a, b) {
|
_todos.sort((a, b) {
|
||||||
if (a.deadline == null) return 1; // Tasks without deadline should come last
|
if (a.deadline == null) return 1; // Tasks without deadline should come last
|
||||||
|
@ -31,14 +31,14 @@ class ToDoProvider with ChangeNotifier {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sortierlogik für Priorität
|
// sorting logic for priority
|
||||||
void sortByPriority() {
|
void sortByPriority() {
|
||||||
Map<String, int> priorityMap = {'High': 1, 'Medium': 2, 'Low': 3};
|
Map<String, int> priorityMap = {'High': 1, 'Medium': 2, 'Low': 3};
|
||||||
_todos.sort((a, b) => priorityMap[a.priority]!.compareTo(priorityMap[b.priority]!));
|
_todos.sort((a, b) => priorityMap[a.priority]!.compareTo(priorityMap[b.priority]!));
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sortierlogik für Status
|
// sorting logic for staus
|
||||||
void sortByStatus() {
|
void sortByStatus() {
|
||||||
_todos.sort((a, b) => a.isCompleted ? 1 : -1); // Uncompleted first
|
_todos.sort((a, b) => a.isCompleted ? 1 : -1); // Uncompleted first
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
|
|
@ -52,7 +52,7 @@ class ToDoListScreen extends StatelessWidget {
|
||||||
itemCount: todoProvider.todos.length,
|
itemCount: todoProvider.todos.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
var todo = todoProvider.todos[index];
|
var todo = todoProvider.todos[index];
|
||||||
String formattedDate = formatDate(todo.deadline); // Formatierung des Datums
|
String formattedDate = formatDate(todo.deadline); // date formatting
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
todo.title,
|
todo.title,
|
||||||
|
|
Loading…
Reference in New Issue