build(pub): 更新依赖

This commit is contained in:
李东云
2023-03-20 15:52:49 +08:00
parent 1e0e834197
commit 16a42bd6b3
24 changed files with 104 additions and 122 deletions

View File

@@ -29,12 +29,12 @@ class AccessControlFilter extends StatefulWidget {
}) : super(key: key);
@override
_AccessControlFilterState createState() => _AccessControlFilterState();
AccessControlFilterState createState() => AccessControlFilterState();
}
class _AccessControlFilterState extends State<AccessControlFilter> {
class AccessControlFilterState extends State<AccessControlFilter> {
/// 登录状态
bool _isLogin = false;
final bool _isLogin = false;
@override
void initState() {
@@ -65,9 +65,13 @@ class _AccessControlFilterState extends State<AccessControlFilter> {
// 缺省的未登录情况下的显示
return Center(
child: RaisedButton(
color: Colors.blueAccent,
textTheme: ButtonTextTheme.primary,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(context).colorScheme.background,
textStyle: TextStyle(
color: Theme.of(context).colorScheme.primary
)
),
child: const Text('请先登录'),
onPressed: () {
Navigator.push(

View File

@@ -70,7 +70,7 @@ class Global {
static List<MaterialColor> get themes => _themes;
// 是否为release版
static bool get isRelease => bool.fromEnvironment("dart.vm.product");
static bool get isRelease => const bool.fromEnvironment("dart.vm.product");
//初始化全局信息会在APP启动时执行
static Future init() async {
@@ -80,13 +80,13 @@ class Global {
// 初始化用户信息
_prefs = await SharedPreferences.getInstance();
var _profile = _prefs?.getString("user_info");
if (_profile != null) {
var profile = _prefs?.getString("user_info");
if (profile != null) {
try {
if (kDebugMode) {
print('开始读取用户信息...');
}
profile = jsonDecode(_profile);
profile = jsonDecode(profile);
if (kDebugMode) {
print('用户信息读取成功');
}