hyzp_ybqx-Commit120:已初步实现定时提醒,默认提醒间隔为60S,准备实现用户设置定时间隔

This commit is contained in:
WinUser01
2022-04-10 10:37:51 +08:00
parent 38ce516148
commit 0e3e9e4fdf
5 changed files with 95 additions and 15 deletions
+10
View File
@@ -11,6 +11,16 @@ class Storage {
return sp.getString(key);
}
static Future<void> setInt(String key, int value) async {
SharedPreferences sp = await SharedPreferences.getInstance();
sp.setInt(key, value);
}
static Future<int> getInt(String key) async {
SharedPreferences sp = await SharedPreferences.getInstance();
return sp.getInt(key);
}
static Future<void> setBool(String key, bool value) async {
SharedPreferences sp = await SharedPreferences.getInstance();
sp.setBool(key, value);