You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
704 B
30 lines
704 B
import 'package:aku_community_manager/const/resource.dart';
|
|
import 'package:aku_community_manager/mock_models/users/user_info_model.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
//登录状态管理
|
|
class UserProvider extends ChangeNotifier {
|
|
bool _isSigned = false;
|
|
|
|
///用户是否登陆
|
|
get isSigned => _isSigned;
|
|
|
|
///设置用户登陆
|
|
setisSigned(bool state) {
|
|
_isSigned = state;
|
|
notifyListeners();
|
|
}
|
|
|
|
UserInfoModel _userInfoModel = UserInfoModel(
|
|
nickName: '李大海',
|
|
avatarPath: R.ASSETS_STATIC_TEMP_F3_WEBP,
|
|
);
|
|
|
|
UserInfoModel get userInfoModel => _userInfoModel;
|
|
|
|
setNickName(String name) {
|
|
_userInfoModel.nickName = name;
|
|
notifyListeners();
|
|
}
|
|
}
|