first commit

This commit is contained in:
kicap
2023-11-01 02:59:57 +08:00
commit 4cc9967ab8
185 changed files with 10489 additions and 0 deletions

View File

@ -0,0 +1,25 @@
import 'package:shared_preferences/shared_preferences.dart';
class MySharedPrefs {
final Future<SharedPreferences> prefs = SharedPreferences.getInstance();
Future<String?> getString(String key) async {
final SharedPreferences prefs = await this.prefs;
return prefs.getString(key);
}
Future<bool> setString(String key, String value) async {
final SharedPreferences prefs = await this.prefs;
return prefs.setString(key, value);
}
Future<bool> removeString(String key) async {
final SharedPreferences prefs = await this.prefs;
return prefs.remove(key);
}
Future<bool> clear() async {
final SharedPreferences prefs = await this.prefs;
return prefs.clear();
}
}