fix(mobile): update guide_5 to jpg and add AnimatedSize for smooth transition
- 将 guide_5.png 改为 guide_5.jpg - 使用 AnimatedSize 包裹推荐码输入框,切换选项时平滑过渡,消除跳跃闪烁 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
07448b381b
commit
9dd4bb3ac5
Binary file not shown.
|
After Width: | Height: | Size: 246 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 MiB |
|
|
@ -62,7 +62,7 @@ class _GuidePageState extends ConsumerState<GuidePage> {
|
||||||
subtitle: '你的资产 · 安全透明 · 不可被篡改',
|
subtitle: '你的资产 · 安全透明 · 不可被篡改',
|
||||||
),
|
),
|
||||||
GuidePageData(
|
GuidePageData(
|
||||||
imagePath: 'assets/images/guide_5.png',
|
imagePath: 'assets/images/guide_5.jpg',
|
||||||
title: '欢迎加入',
|
title: '欢迎加入',
|
||||||
subtitle: '创建账号前的最后一步 · 请选择是否有推荐人',
|
subtitle: '创建账号前的最后一步 · 请选择是否有推荐人',
|
||||||
),
|
),
|
||||||
|
|
@ -563,55 +563,60 @@ class _WelcomePageContentState extends ConsumerState<_WelcomePageContent> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 14.h),
|
SizedBox(height: 14.h),
|
||||||
// 推荐码输入框
|
// 推荐码输入框 - 使用 AnimatedSize 平滑过渡
|
||||||
if (_hasReferrer)
|
AnimatedSize(
|
||||||
Container(
|
duration: const Duration(milliseconds: 200),
|
||||||
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 4.w),
|
curve: Curves.easeInOut,
|
||||||
decoration: BoxDecoration(
|
child: _hasReferrer
|
||||||
border: Border(
|
? Container(
|
||||||
bottom: BorderSide(
|
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 4.w),
|
||||||
width: 1,
|
decoration: BoxDecoration(
|
||||||
color: Colors.white.withValues(alpha: 0.5),
|
border: Border(
|
||||||
),
|
bottom: BorderSide(
|
||||||
),
|
width: 1,
|
||||||
),
|
color: Colors.white.withValues(alpha: 0.5),
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: TextField(
|
|
||||||
controller: _referralCodeController,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
hintText: '请输入推荐码 / 序列号',
|
|
||||||
hintStyle: TextStyle(
|
|
||||||
fontSize: 16.sp,
|
|
||||||
color: Colors.white.withValues(alpha: 0.6),
|
|
||||||
),
|
),
|
||||||
border: InputBorder.none,
|
|
||||||
isDense: true,
|
|
||||||
contentPadding: EdgeInsets.zero,
|
|
||||||
),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16.sp,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
cursorColor: Colors.white,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// 扫码按钮
|
|
||||||
GestureDetector(
|
|
||||||
onTap: _openQrScanner,
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.only(left: 8.w),
|
|
||||||
child: Icon(
|
|
||||||
Icons.camera_alt_outlined,
|
|
||||||
size: 20.sp,
|
|
||||||
color: Colors.white.withValues(alpha: 0.8),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
child: Row(
|
||||||
],
|
children: [
|
||||||
),
|
Expanded(
|
||||||
),
|
child: TextField(
|
||||||
|
controller: _referralCodeController,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: '请输入推荐码 / 序列号',
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
fontSize: 16.sp,
|
||||||
|
color: Colors.white.withValues(alpha: 0.6),
|
||||||
|
),
|
||||||
|
border: InputBorder.none,
|
||||||
|
isDense: true,
|
||||||
|
contentPadding: EdgeInsets.zero,
|
||||||
|
),
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16.sp,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
cursorColor: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// 扫码按钮
|
||||||
|
GestureDetector(
|
||||||
|
onTap: _openQrScanner,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(left: 8.w),
|
||||||
|
child: Icon(
|
||||||
|
Icons.camera_alt_outlined,
|
||||||
|
size: 20.sp,
|
||||||
|
color: Colors.white.withValues(alpha: 0.8),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: const SizedBox.shrink(),
|
||||||
|
),
|
||||||
SizedBox(height: 24.h),
|
SizedBox(height: 24.h),
|
||||||
// 没有推荐人选项
|
// 没有推荐人选项
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue