add
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
class HomePage extends StatelessWidget {
|
||||
// 功能列表数据
|
||||
@@ -32,7 +31,8 @@ class HomePage extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
|
||||
if (result == true) {
|
||||
// 检查组件是否仍处于挂载状态
|
||||
if (result == true && context.mounted) {
|
||||
// 清除用户登录状态的逻辑
|
||||
Navigator.pushReplacementNamed(context, '/login');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user