Some Improvements
This commit is contained in:
@@ -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
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user