feat: 新增勘察明细管理与修改密码功能
This commit is contained in:
1 parent
56830e94ec
commit
774403785c
12 files changed
+1553
-18
No files matched your search
@@ -68,7 +68,7 @@ class ProfileTab extends ConsumerWidget {
|
||||
),
|
||||
),
|
||||
_profileCard(worker, profile?.primaryCert),
|
||||
_menuSection(),
|
||||
_menuSection(context),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: _logoutButton(ref),
|
||||
@@ -323,25 +323,29 @@ class ProfileTab extends ConsumerWidget {
|
||||
],
|
||||
);
|
||||
|
||||
/// 两组 `ios-card` 菜单,行点击仅提示(同源实现)。
|
||||
Widget _menuSection() {
|
||||
/// 两组 `ios-card` 菜单,除「修改密码」跳转外其余行点击仅提示(同源实现)。
|
||||
Widget _menuSection(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 0, 16, 24),
|
||||
child: Column(
|
||||
children: [
|
||||
_menuGroup(const [
|
||||
('order', '我的订单'),
|
||||
('earnings', '收益记录'),
|
||||
('notify', '账户设置'),
|
||||
_menuGroup(context, const [
|
||||
('order', '我的订单', null),
|
||||
('earnings', '收益记录', null),
|
||||
('settings', '修改密码', '/change-password'),
|
||||
('notify', '账户设置', null),
|
||||
]),
|
||||
const SizedBox(height: 12),
|
||||
_menuGroup(const [('star', '帮助中心'), ('shandian', '关于我们')]),
|
||||
_menuGroup(context, const [
|
||||
('star', '帮助中心', null),
|
||||
('shandian', '关于我们', null),
|
||||
]),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _menuGroup(List<(String, String)> items) {
|
||||
Widget _menuGroup(BuildContext context, List<(String, String, String?)> items) {
|
||||
return XCard(
|
||||
radius: AppRadius.lg,
|
||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
||||
@@ -354,16 +358,16 @@ class ProfileTab extends ConsumerWidget {
|
||||
margin: const EdgeInsets.symmetric(horizontal: 16),
|
||||
color: AppColors.borderSoft,
|
||||
),
|
||||
_menuRow(items[i].$1, items[i].$2),
|
||||
_menuRow(context, items[i].$1, items[i].$2, items[i].$3),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _menuRow(String icon, String label) {
|
||||
Widget _menuRow(BuildContext context, String icon, String label, String? route) {
|
||||
return GestureDetector(
|
||||
onTap: () => showAppToast(label),
|
||||
onTap: () => route == null ? showAppToast(label) : context.push(route),
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
|
||||
Reference in new issue
Block a user