退出登陆的重新设计到我的页面;优化高清地图的加载和显示(冷启动稍慢,再次秒开);声网通用组件遗漏文件;
This commit is contained in:
@@ -77,9 +77,9 @@ class _SystemSettingsPageState extends State<SystemSettingsPage> {
|
||||
// 版本更新
|
||||
_buildUpdateSection(),
|
||||
const SizedBox(height: 12),
|
||||
// 退出登录
|
||||
_buildLogoutButton(context),
|
||||
const SizedBox(height: 20),
|
||||
// 退出登录(已挪至“我的”页面最下边,此处注释掉)
|
||||
// _buildLogoutButton(context),
|
||||
// const SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -421,70 +421,70 @@ class _SystemSettingsPageState extends State<SystemSettingsPage> {
|
||||
);
|
||||
}
|
||||
|
||||
/// 退出登录按钮
|
||||
Widget _buildLogoutButton(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
_showLogoutDialog(context);
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: context.appColors.cardBackground,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: context.appColors.cardShadow,
|
||||
blurRadius: 8,
|
||||
offset: Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
AppLocalizations.of(context).translate('login.logout'),
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFFF53F3F),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
/// 退出登录按钮(已挪至“我的”页面最下边,此处注释掉)
|
||||
// Widget _buildLogoutButton(BuildContext context) {
|
||||
// return GestureDetector(
|
||||
// onTap: () {
|
||||
// _showLogoutDialog(context);
|
||||
// },
|
||||
// child: Container(
|
||||
// padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
// decoration: BoxDecoration(
|
||||
// color: context.appColors.cardBackground,
|
||||
// borderRadius: BorderRadius.circular(12),
|
||||
// boxShadow: [
|
||||
// BoxShadow(
|
||||
// color: context.appColors.cardShadow,
|
||||
// blurRadius: 8,
|
||||
// offset: Offset(0, 2),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// child: Center(
|
||||
// child: Text(
|
||||
// AppLocalizations.of(context).translate('login.logout'),
|
||||
// style: const TextStyle(
|
||||
// fontSize: 16,
|
||||
// fontWeight: FontWeight.w500,
|
||||
// color: Color(0xFFF53F3F),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
|
||||
/// 显示退出登录确认对话框
|
||||
void _showLogoutDialog(BuildContext context) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text(AppLocalizations.of(context).translate('login.logout')),
|
||||
content: Text(
|
||||
AppLocalizations.of(context).translate('login.confirm_logout'),
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: Text(AppLocalizations.of(context).translate('my_v2.cancel')),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
Navigator.pop(context);
|
||||
// 执行退出登录逻辑
|
||||
await GetIt.I<UserStorage>().deleteUser();
|
||||
GetIt.I<AuthCubit>().logout();
|
||||
context.go(RoutePaths.login);
|
||||
},
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: const Color(0xFFF53F3F),
|
||||
),
|
||||
child: Text(
|
||||
AppLocalizations.of(context).translate('my_v2.confirm'),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
/// 显示退出登录确认对话框(已挪至“我的”页面最下边,此处注释掉)
|
||||
// void _showLogoutDialog(BuildContext context) {
|
||||
// showDialog(
|
||||
// context: context,
|
||||
// builder: (context) => AlertDialog(
|
||||
// title: Text(AppLocalizations.of(context).translate('login.logout')),
|
||||
// content: Text(
|
||||
// AppLocalizations.of(context).translate('login.confirm_logout'),
|
||||
// ),
|
||||
// actions: [
|
||||
// TextButton(
|
||||
// onPressed: () => Navigator.pop(context),
|
||||
// child: Text(AppLocalizations.of(context).translate('my_v2.cancel')),
|
||||
// ),
|
||||
// TextButton(
|
||||
// onPressed: () async {
|
||||
// Navigator.pop(context);
|
||||
// // 执行退出登录逻辑
|
||||
// await GetIt.I<UserStorage>().deleteUser();
|
||||
// GetIt.I<AuthCubit>().logout();
|
||||
// context.go(RoutePaths.login);
|
||||
// },
|
||||
// style: TextButton.styleFrom(
|
||||
// foregroundColor: const Color(0xFFF53F3F),
|
||||
// ),
|
||||
// child: Text(
|
||||
// AppLocalizations.of(context).translate('my_v2.confirm'),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user