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

@ -188,8 +188,8 @@ class _LoginPageState extends State<LoginPage> {
if (userName.trim().length != 11) {
Fluttertoast.showToast(
msg: "请输入11位手机号",
backgroundColor: Colors.red,
textColor: Colors.orange,
backgroundColor: Colors.orange,
textColor: Colors.white,
fontSize: 20.0);
return;
}
@ -218,7 +218,7 @@ class _LoginPageState extends State<LoginPage> {
if (responseInfo.success) {
Map<String, dynamic> res = {"token": responseInfo.token.toString()};
LoginBean loginBean = LoginBean.fromMap(res);
TokenHelper.getInstance.loginBean = loginBean;
// TokenHelper.getInstance.loginBean = loginBean;
// 将token添加到状态管理器中
Provider.of<TokenProvider>(context, listen: false).setToken(loginBean);
Fluttertoast.showToast(msg: "登录成功");