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:
parent
44de21a733
commit
2790d4c226
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/foundation.dart' show defaultTargetPlatform, TargetPlatform;
|
||||||
import 'package:fluwx/fluwx.dart';
|
import 'package:fluwx/fluwx.dart';
|
||||||
import '../../../../app/theme/app_colors.dart';
|
import '../../../../app/theme/app_colors.dart';
|
||||||
import '../../../../app/theme/app_typography.dart';
|
import '../../../../app/theme/app_typography.dart';
|
||||||
|
|
@ -161,7 +162,9 @@ class _WelcomePageState extends State<WelcomePage> {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
|
|
||||||
// Social Login Buttons — WeChat + Google + Apple
|
// Social Login Buttons
|
||||||
|
// Apple Sign In 仅在 iOS 上显示(Apple 账号体系限定 iOS/macOS 生态)
|
||||||
|
// Android 上只显示 WeChat + Google
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -180,6 +183,7 @@ class _WelcomePageState extends State<WelcomePage> {
|
||||||
Navigator.pushReplacementNamed(context, '/main');
|
Navigator.pushReplacementNamed(context, '/main');
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
if (defaultTargetPlatform == TargetPlatform.iOS) ...[
|
||||||
const SizedBox(width: 24),
|
const SizedBox(width: 24),
|
||||||
_SocialLoginButton(
|
_SocialLoginButton(
|
||||||
icon: Icons.apple_rounded,
|
icon: Icons.apple_rounded,
|
||||||
|
|
@ -189,6 +193,7 @@ class _WelcomePageState extends State<WelcomePage> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 32),
|
const SizedBox(height: 32),
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue