feat(pre-planting): Profile 页面添加预种计划入口

[2026-02-17] 在 Profile 页面认种按钮下方新增预种计划入口

新增内容(纯新增,不改现有逻辑):
- _goToPrePlantingPurchase():跳转预种购买页
- _goToPrePlantingPosition():跳转预种持仓页
- _buildPrePlantingButtons():两个并排按钮
  - 左侧「预种购买」:金色主题,跳转购买页
  - 右侧「预种持仓」:棕色主题,跳转持仓页

布局位置:认种按钮正下方,主内容卡片上方
现有功能零影响,仅新增 3 个方法 + 1 处布局插入

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-02-18 05:44:48 -08:00
parent d248f92443
commit 03f5c4af28
1 changed files with 100 additions and 0 deletions

View File

@ -1234,6 +1234,16 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
context.push(RoutePaths.plantingQuantity); context.push(RoutePaths.plantingQuantity);
} }
/// [2026-02-17]
void _goToPrePlantingPurchase() {
context.push(RoutePaths.prePlantingPurchase);
}
/// [2026-02-17]
void _goToPrePlantingPosition() {
context.push(RoutePaths.prePlantingPosition);
}
/// ///
void _goToGoogleAuth() { void _goToGoogleAuth() {
context.push(RoutePaths.googleAuth); context.push(RoutePaths.googleAuth);
@ -1418,6 +1428,9 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
const SizedBox(height: 8), const SizedBox(height: 8),
// //
_buildPlantingButton(), _buildPlantingButton(),
const SizedBox(height: 8),
// [2026-02-17] +
_buildPrePlantingButtons(),
const SizedBox(height: 16), const SizedBox(height: 16),
// //
VisibilityDetector( VisibilityDetector(
@ -1902,6 +1915,93 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
); );
} }
/// [2026-02-17] +
///
///
/// - 3171 USDT/
/// -
Widget _buildPrePlantingButtons() {
return Row(
children: [
//
Expanded(
child: GestureDetector(
onTap: _goToPrePlantingPurchase,
child: Container(
height: 44,
decoration: BoxDecoration(
color: const Color(0xFFD4AF37).withValues(alpha: 0.15),
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: const Color(0xFFD4AF37).withValues(alpha: 0.4),
width: 1,
),
),
child: const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.add_circle_outline,
color: Color(0xFFD4AF37),
size: 18,
),
SizedBox(width: 6),
Text(
'预种购买',
style: TextStyle(
fontSize: 14,
fontFamily: 'Inter',
fontWeight: FontWeight.w600,
color: Color(0xFFD4AF37),
),
),
],
),
),
),
),
const SizedBox(width: 8),
//
Expanded(
child: GestureDetector(
onTap: _goToPrePlantingPosition,
child: Container(
height: 44,
decoration: BoxDecoration(
color: const Color(0xFF5D4037).withValues(alpha: 0.08),
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: const Color(0xFF5D4037).withValues(alpha: 0.2),
width: 1,
),
),
child: const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.account_balance_wallet_outlined,
color: Color(0xFF5D4037),
size: 18,
),
SizedBox(width: 6),
Text(
'预种持仓',
style: TextStyle(
fontSize: 14,
fontFamily: 'Inter',
fontWeight: FontWeight.w600,
color: Color(0xFF5D4037),
),
),
],
),
),
),
),
],
);
}
/// ///
Widget _buildMainContentCard() { Widget _buildMainContentCard() {
// Widget "0" // Widget "0"