sqllite database save magnetic declination data
This commit is contained in:
@ -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: "登录成功");
|
||||
|
Reference in New Issue
Block a user