feat(mobile-app): 优化创建钱包页面UI

- 添加背景图片 onboarding_bg.jpg
- 移除重复的logo和标题(背景图已包含)
- 添加白色半透明卡片背景提高文字可读性
- 调整颜色主题为绿色系匹配背景
- 修改认种确认弹窗标题为"一旦确认,无法更改"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-15 19:33:04 -08:00
parent ebb0b85ab5
commit bbd6f2ee38
3 changed files with 113 additions and 130 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

View File

@ -257,31 +257,28 @@ class _OnboardingPageState extends ConsumerState<OnboardingPage> {
body: Container( body: Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
// - //
decoration: const BoxDecoration( decoration: const BoxDecoration(
gradient: LinearGradient( image: DecorationImage(
begin: Alignment.topCenter, image: AssetImage('assets/images/backgrounds/onboarding_bg.jpg'),
end: Alignment.bottomCenter, fit: BoxFit.cover,
colors: [
Color(0xFFFFF5E6), //
Color(0xFFFFE4B5), //
],
), ),
), ),
child: SafeArea( child: SafeArea(
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 15), padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 15),
child: Column( child: Column(
children: [ children: [
// Logo //
_buildHeader(), _buildHeader(),
const SizedBox(height: 48), // logo
const Spacer(flex: 3),
// //
_buildDescription(), _buildDescription(),
const Spacer(), const SizedBox(height: 16),
// //
_buildActionSection(), _buildActionSection(),
const SizedBox(height: 9), const Spacer(flex: 1),
], ],
), ),
), ),
@ -297,136 +294,122 @@ class _OnboardingPageState extends ConsumerState<OnboardingPage> {
context.go(RoutePaths.guide, extra: 4); context.go(RoutePaths.guide, extra: 4);
} }
/// Logo ///
Widget _buildHeader() { Widget _buildHeader() {
return Column( return SizedBox(
children: [ height: 32,
// - child: (!_isLoading && !_isAccountCreated)
SizedBox( ? Align(
height: 32, alignment: Alignment.centerLeft,
child: (!_isLoading && !_isAccountCreated) child: GestureDetector(
? Align( onTap: _goBackToGuide,
alignment: Alignment.centerLeft, behavior: HitTestBehavior.opaque,
child: GestureDetector( child: Container(
onTap: _goBackToGuide, padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
behavior: HitTestBehavior.opaque, decoration: BoxDecoration(
child: const Padding( color: Colors.white.withValues(alpha: 0.9),
padding: EdgeInsets.symmetric(vertical: 4), borderRadius: BorderRadius.circular(16),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.arrow_back_ios,
size: 18,
color: Color(0xFF5D4037),
),
SizedBox(width: 4),
Text(
'返回',
style: TextStyle(
fontSize: 14,
fontFamily: 'Inter',
fontWeight: FontWeight.w500,
color: Color(0xFF5D4037),
),
),
],
),
),
), ),
) child: const Row(
: null, mainAxisSize: MainAxisSize.min,
), children: [
// Logo Icon(
Container( Icons.arrow_back_ios,
width: 100, size: 16,
height: 80, color: Color(0xFF2E7D32),
decoration: BoxDecoration( ),
color: Colors.white, SizedBox(width: 4),
borderRadius: BorderRadius.circular(8), Text(
boxShadow: [ '返回',
BoxShadow( style: TextStyle(
color: Colors.black.withValues(alpha: 0.05), fontSize: 14,
blurRadius: 10, fontFamily: 'Inter',
offset: const Offset(0, 2), fontWeight: FontWeight.w600,
color: Color(0xFF2E7D32),
),
),
],
),
),
), ),
], )
), : null,
child: const Center(
child: Text(
'ap',
style: TextStyle(
fontSize: 32,
fontWeight: FontWeight.w600,
color: Color(0xFF2E7D32), // 绿
),
),
),
),
const SizedBox(height: 24),
//
const Text(
'榴莲皇后',
style: TextStyle(
fontSize: 32,
fontFamily: 'Inter',
fontWeight: FontWeight.w700,
height: 1.25,
color: Color(0xFF5D4037), //
),
),
],
); );
} }
/// ///
Widget _buildDescription() { Widget _buildDescription() {
return Column( return Container(
children: [ padding: const EdgeInsets.all(20),
// decoration: BoxDecoration(
const Text( color: Colors.white.withValues(alpha: 0.95),
'创建账户', borderRadius: BorderRadius.circular(16),
style: TextStyle( boxShadow: [
fontSize: 22, BoxShadow(
fontFamily: 'Inter', color: Colors.black.withValues(alpha: 0.1),
fontWeight: FontWeight.w700, blurRadius: 10,
height: 1.25, offset: const Offset(0, 4),
letterSpacing: -0.33,
color: Color(0xFF5D4037),
), ),
), ],
const SizedBox(height: 16), ),
// child: const Column(
const Padding( children: [
padding: EdgeInsets.symmetric(horizontal: 20), //
child: Text( Text(
'创建账户',
style: TextStyle(
fontSize: 22,
fontFamily: 'Inter',
fontWeight: FontWeight.w700,
height: 1.25,
letterSpacing: -0.33,
color: Color(0xFF2E7D32),
),
),
SizedBox(height: 12),
//
Text(
'我们将为你创建三个链的钱包地址KAVA / DST / BSC同时生成唯一序列号用于推荐与权益。', '我们将为你创建三个链的钱包地址KAVA / DST / BSC同时生成唯一序列号用于推荐与权益。',
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 15,
fontFamily: 'Inter', fontFamily: 'Inter',
height: 1.5, height: 1.5,
color: Color(0xFF5D4037), color: Color(0xFF424242),
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ],
], ),
); );
} }
/// ///
Widget _buildActionSection() { Widget _buildActionSection() {
return Column( return Container(
children: [ padding: const EdgeInsets.all(20),
// decoration: BoxDecoration(
_buildCreateButton(), color: Colors.white.withValues(alpha: 0.95),
const SizedBox(height: 20), borderRadius: BorderRadius.circular(16),
// boxShadow: [
_buildAgreementCheckbox(), BoxShadow(
const SizedBox(height: 24), color: Colors.black.withValues(alpha: 0.1),
// blurRadius: 10,
_buildImportLink(), offset: const Offset(0, 4),
], ),
],
),
child: Column(
children: [
//
_buildCreateButton(),
const SizedBox(height: 16),
//
_buildAgreementCheckbox(),
const SizedBox(height: 16),
//
_buildImportLink(),
],
),
); );
} }
@ -532,8 +515,8 @@ class _OnboardingPageState extends ConsumerState<OnboardingPage> {
_isAgreed = value ?? false; _isAgreed = value ?? false;
}); });
}, },
activeColor: const Color(0xFFD4AF37), activeColor: const Color(0xFF2E7D32),
side: const BorderSide(color: Color(0xFF5D4037)), side: const BorderSide(color: Color(0xFF757575)),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4), borderRadius: BorderRadius.circular(4),
), ),
@ -549,18 +532,18 @@ class _OnboardingPageState extends ConsumerState<OnboardingPage> {
fontFamily: 'Inter', fontFamily: 'Inter',
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
height: 1.43, height: 1.43,
color: Color(0xFF5D4037), color: Color(0xFF424242),
), ),
children: [ children: [
const TextSpan(text: '我已阅读并同意 '), const TextSpan(text: '我已阅读并同意 '),
TextSpan( TextSpan(
text: '《用户协议》', text: '《用户协议》',
style: const TextStyle(color: Color(0xFFD4AF37)), style: const TextStyle(color: Color(0xFF2E7D32)),
recognizer: TapGestureRecognizer()..onTap = _showUserAgreement, recognizer: TapGestureRecognizer()..onTap = _showUserAgreement,
), ),
TextSpan( TextSpan(
text: '《隐私政策》', text: '《隐私政策》',
style: const TextStyle(color: Color(0xFFD4AF37)), style: const TextStyle(color: Color(0xFF2E7D32)),
recognizer: TapGestureRecognizer()..onTap = _showPrivacyPolicy, recognizer: TapGestureRecognizer()..onTap = _showPrivacyPolicy,
), ),
], ],
@ -580,9 +563,9 @@ class _OnboardingPageState extends ConsumerState<OnboardingPage> {
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontFamily: 'Inter', fontFamily: 'Inter',
fontWeight: FontWeight.w500, fontWeight: FontWeight.w600,
height: 1.43, height: 1.43,
color: Color(0xFFD4AF37), color: Color(0xFF2E7D32),
), ),
), ),
); );

View File

@ -196,7 +196,7 @@ class _PlantingConfirmDialogState extends State<PlantingConfirmDialog> {
/// ///
Widget _buildTitle() { Widget _buildTitle() {
return const Text( return const Text(
'最后确认!不可修改!', '一旦确认,无法更改',
style: TextStyle( style: TextStyle(
fontSize: 22, fontSize: 22,
fontFamily: 'Inter', fontFamily: 'Inter',