fixed typo, removed unnecessary print statements

This commit is contained in:
Benimautner 2023-12-03 21:21:28 +01:00
parent 2b86e98812
commit 7db2cc1e67
5 changed files with 3 additions and 14 deletions

View File

@ -81,7 +81,6 @@ class Client {
[Map<String, List<String>>? queryParameters]) {
Uri uri = Uri.tryParse('${this.base}$url')!;
// why are we doing it like this? because Uri doesnt have setters. wtf.
print(uri.toString());
uri = Uri(
scheme: uri.scheme,

View File

@ -93,20 +93,11 @@ class TaskAPIService extends APIService implements TaskService {
Map<String, List<String>> optionsMap = options.getOptions();
//optionString = "?sort_by[]=due_date&sort_by[]=id&order_by[]=asc&order_by[]=desc&filter_by[]=done&filter_value[]=false&filter_comparator[]=equals&filter_concat=and&filter_include_nulls=false&page=1";
//print(optionString);
Map<String, List<String>> queryparams = {
"sort_by[]":["due_date", "id"],
"order_by[]":["asc", "desc"],
"filter_by[]": ["done"],
"filter_value[]":["false"],
"filter_comparator[]":["equals"],
"filter_concat[]":["and"],
};
return client
.get('/tasks/all', optionsMap)
.then((response) {
if (response == null) return null;
print(response.body);
print(response.headers);
return convertList(response.body, (result) => Task.fromJson(result));
});
}

View File

@ -47,7 +47,7 @@ Widget? _buildTaskSubtitle(Task? task, bool showInfo) {
texts.add(TextSpan(text: "Due " + durationToHumanReadable(durationUntilDue!), style: durationUntilDue.isNegative ? TextStyle(color: Colors.red) : null));
}
if(task.priority != null && task.priority != 0) {
texts.add(TextSpan(text: " !" + priorityToString(task.projectId), style: TextStyle(color: Colors.orange)));
texts.add(TextSpan(text: " !" + priorityToString(task.priority), style: TextStyle(color: Colors.orange)));
}
if(texts.isEmpty && task.description.isNotEmpty) {

View File

@ -246,7 +246,6 @@ class LandingPageState extends State<LandingPage>
Future<void> _handleTaskList(List<Task>? taskList, bool showOnlyDueDateTasks) {
if(showOnlyDueDateTasks)
taskList?.removeWhere((element) => element.dueDate == null || element.dueDate!.year == 0001);
taskList?.forEach((element) {print(element.title);});
if (taskList != null && taskList.isEmpty) {
setState(() {

View File

@ -13,7 +13,7 @@ priorityToString(int? priority) {
case 5:
return 'DO NOW';
default:
return null;
return "";
}
}