release 1.0

This commit is contained in:
jyuesong
2022-01-18 14:50:03 +08:00
parent b9767339ec
commit 0456f99c21
3 changed files with 27 additions and 5 deletions

View File

@@ -233,8 +233,27 @@ class _OtherPageState extends ConsumerState<OtherPage> {
),
),
onPressed: () {
getIt<UserInfoViewModel>().updateToken("");
Navigator.of(context).pushReplacementNamed(Routes.routeLogin);
showCupertinoDialog(
context: context,
builder: (context) => CupertinoAlertDialog(
title: const Text("确定退出登录吗?"),
actions: [
CupertinoDialogAction(
child: const Text("取消"),
onPressed: () {
Navigator.of(context).pop();
},
),
CupertinoDialogAction(
child: const Text("确定"),
onPressed: () {
getIt<UserInfoViewModel>().updateToken("");
Navigator.of(context).pushReplacementNamed(Routes.routeLogin);
},
),
],
),
);
}),
),
),