sqllite database save magnetic declination data

This commit is contained in:
cxc
2022-06-30 17:01:04 +08:00
parent d962dc8023
commit c7ccf28e9f
11 changed files with 173 additions and 166 deletions

View File

@ -12,7 +12,7 @@ class TokenProvider extends ChangeNotifier {
bool get isLogin => _loginBean != null;
loadToken() {
void loadToken() {
Map<String, dynamic> map = SPUtil.getObject("token_bean");
if (map != null) {
//加载缓存
@ -21,13 +21,15 @@ class TokenProvider extends ChangeNotifier {
notifyListeners();
}
clearToken() {
void clearToken() {
_loginBean = null;
SPUtil.remove("token_bean");
notifyListeners();
}
setToken(LoginBean lb) {
void setToken(LoginBean lb) {
_loginBean = lb;
SPUtil.saveObject("token_bean", lb);
notifyListeners();
}
}