add packages, receiving & processing

This commit is contained in:
Sai Naw Wun
2020-10-12 03:34:05 +06:30
parent 32e6be2abd
commit b13dc69161
36 changed files with 1110 additions and 668 deletions

View File

@@ -27,6 +27,16 @@ class SharedPref {
prefs.setString('language', lang);
}
static Future<bool> getStaffMode() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
return prefs.getBool('staff_mode_on');
}
static Future<void> saveStaffMode(bool staffMode) async {
SharedPreferences prefs = await SharedPreferences.getInstance();
prefs.setBool('staff_mode_on', staffMode);
}
static Future<void> saveUser(User user) async {
await _save("user", user.toJson());
}