fix(genex-mobile): Apple 登录按钮仅在 iOS 上显示

Apple Sign In 是 iOS/macOS 生态专属功能,Android 用户不存在
Apple ID 账号体系,不应在 Android 上展示该入口。

使用 defaultTargetPlatform == TargetPlatform.iOS 条件渲染:
- Android: WeChat + Google(2个按钮)
- iOS:     WeChat + Google + Apple(3个按钮)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-03-04 04:21:34 -08:00
parent 44de21a733
commit 2790d4c226
1 changed files with 14 additions and 9 deletions

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart' show defaultTargetPlatform, TargetPlatform;
import 'package:fluwx/fluwx.dart';
import '../../../../app/theme/app_colors.dart';
import '../../../../app/theme/app_typography.dart';
@ -161,7 +162,9 @@ class _WelcomePageState extends State<WelcomePage> {
),
const SizedBox(height: 16),
// Social Login Buttons WeChat + Google + Apple
// Social Login Buttons
// Apple Sign In iOS Apple iOS/macOS
// Android WeChat + Google
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@ -180,14 +183,16 @@ class _WelcomePageState extends State<WelcomePage> {
Navigator.pushReplacementNamed(context, '/main');
},
),
const SizedBox(width: 24),
_SocialLoginButton(
icon: Icons.apple_rounded,
label: 'Apple',
onTap: () {
Navigator.pushReplacementNamed(context, '/main');
},
),
if (defaultTargetPlatform == TargetPlatform.iOS) ...[
const SizedBox(width: 24),
_SocialLoginButton(
icon: Icons.apple_rounded,
label: 'Apple',
onTap: () {
Navigator.pushReplacementNamed(context, '/main');
},
),
],
],
),
const SizedBox(height: 32),