Skip to content

Commit c3197c9

Browse files
committed
配置profile_router
1 parent 0ce538a commit c3197c9

File tree

2 files changed

+33
-22
lines changed

2 files changed

+33
-22
lines changed

lib/views/profile/account_security/account_security_page.dart

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,7 @@ class _AccountSecurityPageState extends State<AccountSecurityPage> {
5050
final password = CommonItem(
5151
title: "微信密码",
5252
subtitle: '已设置',
53-
onTap: (_) {
54-
Navigator.of(context).push(new MaterialPageRoute(
55-
builder: (_) {
56-
return null;
57-
},
58-
));
59-
},
53+
onTap: (_) {},
6054
);
6155
// 声音锁
6256
final voiceLock = CommonItem(

lib/views/profile/profile_rourer.dart

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import 'package:fluro/fluro.dart';
22
import 'package:flutter_wechat/routers/router_init.dart';
33

4-
import 'setting/setting_page.dart';
4+
import 'package:flutter_wechat/views/profile/setting/setting_page.dart';
55
import 'package:flutter_wechat/views/profile/about_us/about_us_page.dart';
6+
import 'package:flutter_wechat/views/profile/account_security/account_security_page.dart';
7+
import 'package:flutter_wechat/views/profile/general/general_page.dart';
8+
import 'package:flutter_wechat/views/profile/message_notify/message_notify_page.dart';
9+
import 'package:flutter_wechat/views/profile/privates/privates_page.dart';
610
import 'profile_page.dart';
711

812
class ProfileRouter implements IRouterProvider {
@@ -15,27 +19,40 @@ class ProfileRouter implements IRouterProvider {
1519
/// 关于微信
1620
static String aboutUsPage = "/profile/about-us";
1721

18-
/// 当前账号登陆
19-
static String currentprofilePage = "/profile/current-profile";
22+
/// 账号与安全
23+
static String accountSecurityPage = "/profile/account-security";
2024

21-
/// 手机号登录
22-
static String phoneprofilePage = "/profile/phone-profile";
25+
/// 新消息通知
26+
static String messageNotifyPage = "/profile/message-notify";
2327

24-
/// 语言选择器
25-
static String languagePickerPage = "/profile/language-picker";
28+
/// 隐私
29+
static String privatesPage = "/profile/privates";
30+
31+
/// 通用
32+
static String generalPage = "/profile/general";
2633

2734
@override
2835
void initRouter(Router router) {
29-
router.define(profilePage,
30-
handler: Handler(handlerFunc: (_, params) => ProfilePage()));
31-
router.define(settingPage,
32-
handler: Handler(handlerFunc: (_, params) => SettingPage()));
36+
// 我root页
37+
router.define(
38+
profilePage,
39+
handler: Handler(handlerFunc: (_, params) => ProfilePage()),
40+
);
41+
// 设置
42+
router.define(
43+
settingPage,
44+
handler: Handler(handlerFunc: (_, params) => SettingPage()),
45+
);
3346
router.define(aboutUsPage,
3447
handler: Handler(handlerFunc: (_, params) => AboutUsPage()));
35-
// router.define(otherLoginPage,
36-
// handler: Handler(handlerFunc: (_, params) => OtherLoginPage()));
37-
// router.define(currentLoginPage,
38-
// handler: Handler(handlerFunc: (_, params) => CurrentLoginPage()));
48+
router.define(accountSecurityPage,
49+
handler: Handler(handlerFunc: (_, params) => AccountSecurityPage()));
50+
router.define(messageNotifyPage,
51+
handler: Handler(handlerFunc: (_, params) => MessageNotifyPage()));
52+
router.define(privatesPage,
53+
handler: Handler(handlerFunc: (_, params) => PrivatesPage()));
54+
router.define(generalPage,
55+
handler: Handler(handlerFunc: (_, params) => GeneralPage()));
3956
// router.define(phoneLoginPage, handler: Handler(handlerFunc: (_, params) {
4057
// final String phone = params['phone']?.first;
4158
// final String zoneCode = params['zone_code']?.first;

0 commit comments

Comments
 (0)