parent
a20b53725b
commit
8e12d18437
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
@ -0,0 +1,4 @@
|
|||||||
|
class UserInfoModel {
|
||||||
|
String nickName;
|
||||||
|
String avatarPath;
|
||||||
|
}
|
@ -1,10 +1,18 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
//登录状态管理
|
//登录状态管理
|
||||||
class UserProvider extends ChangeNotifier{
|
class UserProvider extends ChangeNotifier{
|
||||||
|
|
||||||
|
|
||||||
bool _isSigned=false;
|
bool _isSigned=false;
|
||||||
|
///用户是否登陆
|
||||||
get isSigned=>_isSigned;
|
get isSigned=>_isSigned;
|
||||||
|
|
||||||
|
///设置用户登陆
|
||||||
setisSigned (bool state){
|
setisSigned (bool state){
|
||||||
_isSigned=state;
|
_isSigned=state;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in new issue