refactor(mobile-app): 树转让入口从"我"页面迁移至"实名认证"页面

将"发起转让"和"转让记录"按钮从 ProfilePage 顶部移除,
归类为"树服务"放入 KycEntryPage(实名认证入口页),
位于"其他操作 > 验证/更换手机号"的下方。

变更详情:
- profile_page.dart:
  · 移除 _buildTransferButtons() 方法及其调用
  · 移除 _goToTransferInitiate() / _goToTransferList() 导航方法
- kyc_entry_page.dart:
  · 在"验证/更换手机号"下方新增"树服务"分类标题
  · 新增"发起转让"操作卡片 → /transfer/initiate
  · 新增"转让记录"操作卡片 → /transfer/list
  · 复用页面已有的 _buildActionCard 样式,保持 UI 一致

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-03-01 19:47:39 -08:00
parent b3984c861c
commit 0e34896d0b
2 changed files with 28 additions and 97 deletions

View File

@ -136,6 +136,34 @@ class KycEntryPage extends ConsumerWidget {
SizedBox(height: 24.h),
//
Text(
'树服务',
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.w600,
color: const Color(0xFF333333),
),
),
SizedBox(height: 12.h),
_buildActionCard(
context: context,
icon: Icons.swap_horiz,
title: '发起转让',
description: '向其他用户发起树转让',
onTap: () => context.push(RoutePaths.transferInitiate),
),
SizedBox(height: 8.h),
_buildActionCard(
context: context,
icon: Icons.receipt_long_outlined,
title: '转让记录',
description: '查看树转让历史记录',
onTap: () => context.push(RoutePaths.transferList),
),
SizedBox(height: 24.h),
//
_buildInfoCard(),
],

View File

@ -1366,16 +1366,6 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
context.push(RoutePaths.prePlantingPosition);
}
/// [2026-02-19]
void _goToTransferInitiate() {
context.push(RoutePaths.transferInitiate);
}
/// [2026-02-19]
void _goToTransferList() {
context.push(RoutePaths.transferList);
}
///
void _goToGoogleAuth() {
context.push(RoutePaths.googleAuth);
@ -1567,8 +1557,6 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
_buildPrePlantingButtons(),
const SizedBox(height: 8),
],
// [2026-02-19] +
_buildTransferButtons(),
const SizedBox(height: 16),
//
VisibilityDetector(
@ -2140,91 +2128,6 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
);
}
/// [2026-02-19] +
///
/// 使绿
Widget _buildTransferButtons() {
return Row(
children: [
//
Expanded(
child: GestureDetector(
onTap: _goToTransferInitiate,
child: Container(
height: 44,
decoration: BoxDecoration(
color: const Color(0xFF2E7D32).withValues(alpha: 0.15),
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: const Color(0xFF2E7D32).withValues(alpha: 0.4),
width: 1,
),
),
child: const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.swap_horiz,
color: Color(0xFF4CAF50),
size: 18,
),
SizedBox(width: 6),
Text(
'发起转让',
style: TextStyle(
fontSize: 14,
fontFamily: 'Inter',
fontWeight: FontWeight.w600,
color: Color(0xFF4CAF50),
),
),
],
),
),
),
),
const SizedBox(width: 8),
//
Expanded(
child: GestureDetector(
onTap: _goToTransferList,
child: Container(
height: 44,
decoration: BoxDecoration(
color: const Color(0xFF1565C0).withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: const Color(0xFF1565C0).withValues(alpha: 0.25),
width: 1,
),
),
child: const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.receipt_long_outlined,
color: Color(0xFF42A5F5),
size: 18,
),
SizedBox(width: 6),
Text(
'转让记录',
style: TextStyle(
fontSize: 14,
fontFamily: 'Inter',
fontWeight: FontWeight.w600,
color: Color(0xFF42A5F5),
),
),
],
),
),
),
),
],
);
}
///
Widget _buildMainContentCard() {
// Widget "0"