Some Improvements

This commit is contained in:
brausjonas
2024-09-17 20:53:56 +02:00
parent 46063af653
commit 54eb6814da
6 changed files with 74 additions and 19 deletions
+7
View File
@@ -21,6 +21,13 @@ class FileHandler {
return js;
}
static Future<void> saveNotified(String listName, String todoName, String notifyType, bool value) async {
Map content = await fileContent;
content[listName][todoName][notifyType] = value;
await saveFile(content);
}
static Future<void> saveFile(js) async {
File f = await localFile;
String content = json.encode(js);
+3 -1
View File
@@ -1,10 +1,12 @@
import 'package:flutter/material.dart';
class Todo {
Todo({required this.title, required this.widget, required this.checked, required this.dueTime});
Todo({required this.title, required this.widget, required this.checked, required this.dueTime, required this.notifiedDay, required this.notifiedHour});
String title;
Widget widget;
DateTime dueTime;
bool checked;
bool notifiedHour;
bool notifiedDay;
}