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:
hailin 2025-12-08 23:50:22 -08:00
parent cb9e520fb4
commit dbe0cc2870
1 changed files with 14 additions and 14 deletions

View File

@ -246,14 +246,14 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
);
}
///
void _copyShareLink() {
Clipboard.setData(ClipboardData(text: 'https://rwa.app/invite/$_serialNumber'));
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('分享链接已复制'),
backgroundColor: Color(0xFFD4AF37),
),
///
void _goToSharePage() {
context.push(
RoutePaths.share,
extra: {
'shareLink': 'https://s3.szaiai.com/rwadurian/app-release.apk',
'referralCode': _referralCode,
},
);
}
@ -716,8 +716,8 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
//
_buildReferralList(),
const SizedBox(height: 16),
//
_buildCopyShareButton(),
//
_buildShareButton(),
const SizedBox(height: 16),
//
_buildCommunityAssessment(),
@ -1242,10 +1242,10 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
);
}
///
Widget _buildCopyShareButton() {
///
Widget _buildShareButton() {
return GestureDetector(
onTap: _copyShareLink,
onTap: _goToSharePage,
child: Container(
width: double.infinity,
height: 48,
@ -1264,7 +1264,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
),
SizedBox(width: 8),
Text(
'复制分享链接',
'分享邀请',
style: TextStyle(
fontSize: 16,
fontFamily: 'Inter',