feat(mobile-app): change profile share button to navigate to share page
- Replace copy link action with navigation to share page - Pass referralCode to share page for QR code generation - Rename button text from '复制分享链接' to '分享邀请' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
cb9e520fb4
commit
dbe0cc2870
|
|
@ -246,14 +246,14 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 复制分享链接
|
/// 跳转到分享页面
|
||||||
void _copyShareLink() {
|
void _goToSharePage() {
|
||||||
Clipboard.setData(ClipboardData(text: 'https://rwa.app/invite/$_serialNumber'));
|
context.push(
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
RoutePaths.share,
|
||||||
const SnackBar(
|
extra: {
|
||||||
content: Text('分享链接已复制'),
|
'shareLink': 'https://s3.szaiai.com/rwadurian/app-release.apk',
|
||||||
backgroundColor: Color(0xFFD4AF37),
|
'referralCode': _referralCode,
|
||||||
),
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -716,8 +716,8 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
// 直推列表
|
// 直推列表
|
||||||
_buildReferralList(),
|
_buildReferralList(),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
// 复制分享链接
|
// 分享邀请按钮
|
||||||
_buildCopyShareButton(),
|
_buildShareButton(),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
// 社区权益考核
|
// 社区权益考核
|
||||||
_buildCommunityAssessment(),
|
_buildCommunityAssessment(),
|
||||||
|
|
@ -1242,10 +1242,10 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 构建复制分享按钮
|
/// 构建分享按钮
|
||||||
Widget _buildCopyShareButton() {
|
Widget _buildShareButton() {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: _copyShareLink,
|
onTap: _goToSharePage,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 48,
|
height: 48,
|
||||||
|
|
@ -1264,7 +1264,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
Text(
|
Text(
|
||||||
'复制分享链接',
|
'分享邀请',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue