user-page
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import 'package:chat/configs/app_colors.dart';
|
||||
import 'package:chat/routes/user_routes.dart';
|
||||
import 'package:chat/services/auth_service.dart';
|
||||
import 'package:chat/views/home/widgets/action_button.dart';
|
||||
import 'package:chat/views/home/widgets/action_item.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class UserSettingPage extends StatefulWidget {
|
||||
const UserSettingPage({Key? key}) : super(key: key);
|
||||
@@ -17,11 +22,90 @@ class _UserSettingPageState extends State<UserSettingPage> {
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
ActionItem(
|
||||
'账号与安全',
|
||||
onTap: () {
|
||||
Get.toNamed(UserRoutes.safe);
|
||||
},
|
||||
),
|
||||
const Divider(
|
||||
height: 0,
|
||||
color: AppColors.border,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const Divider(
|
||||
height: 0,
|
||||
color: AppColors.border,
|
||||
),
|
||||
ActionItem(
|
||||
'新消息通知',
|
||||
onTap: () {
|
||||
Get.toNamed(UserRoutes.safe);
|
||||
},
|
||||
),
|
||||
const Divider(
|
||||
height: 0,
|
||||
color: AppColors.border,
|
||||
indent: 16,
|
||||
),
|
||||
ActionItem(
|
||||
'隐私权限',
|
||||
onTap: () {
|
||||
Get.toNamed(UserRoutes.safe);
|
||||
},
|
||||
),
|
||||
const Divider(
|
||||
height: 0,
|
||||
color: AppColors.border,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
ActionItem(
|
||||
'关于ZH-CHAT',
|
||||
onTap: () {
|
||||
Get.toNamed(UserRoutes.safe);
|
||||
},
|
||||
),
|
||||
const Divider(
|
||||
height: 0,
|
||||
color: AppColors.border,
|
||||
indent: 16,
|
||||
),
|
||||
ActionItem(
|
||||
'帮助与反馈',
|
||||
onTap: () {
|
||||
Get.toNamed(UserRoutes.safe);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const Divider(
|
||||
height: 0,
|
||||
color: AppColors.border,
|
||||
),
|
||||
ActionItem(
|
||||
'版本更新',
|
||||
onTap: () {
|
||||
Get.toNamed(UserRoutes.safe);
|
||||
},
|
||||
),
|
||||
const Divider(
|
||||
height: 0,
|
||||
color: AppColors.border,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const Divider(
|
||||
height: 0,
|
||||
color: AppColors.border,
|
||||
),
|
||||
ActionButton(
|
||||
'退出',
|
||||
color: AppColors.primary,
|
||||
onTap: () async {
|
||||
AuthService.to.logout();
|
||||
},
|
||||
child: const Text('退出登录'),
|
||||
),
|
||||
const Divider(
|
||||
height: 0,
|
||||
color: AppColors.border,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user