|
|
|
@ -446,33 +446,38 @@ class LoginView extends GetView<LoginController> { |
|
|
|
], |
|
|
|
), |
|
|
|
SizedBox(height: 24.h), |
|
|
|
Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
if (controller.isChinaMainland.value) ...[ |
|
|
|
_buildSocialButton( |
|
|
|
FontAwesomeIcons.weixin, Colors.green, isDarkMode), |
|
|
|
] else if (GetPlatform.isAndroid) ...[ |
|
|
|
_buildSocialButton( |
|
|
|
FontAwesomeIcons.google, Colors.red, isDarkMode), |
|
|
|
], |
|
|
|
Builder( |
|
|
|
builder: (_) { |
|
|
|
final buttons = <Widget>[]; |
|
|
|
|
|
|
|
// Apple登录按钮(仅在iOS上显示) |
|
|
|
if (GetPlatform.isIOS) ...[ |
|
|
|
SizedBox(width: 24.w), |
|
|
|
_buildSocialButton( |
|
|
|
FontAwesomeIcons.apple, Colors.black, isDarkMode), |
|
|
|
], |
|
|
|
// SizedBox(width: 24.w), |
|
|
|
// _buildSocialButton( |
|
|
|
// FontAwesomeIcons.facebook, Colors.blue, isDarkMode), |
|
|
|
// 根据配置显示游客登录按钮 |
|
|
|
if (controller.isGuestLoginVisible) ...[ |
|
|
|
SizedBox(width: 24.w), |
|
|
|
_buildSocialButton(FontAwesomeIcons.userSecret, Colors.black, |
|
|
|
isDarkMode), // 游客登录按钮 |
|
|
|
], |
|
|
|
], |
|
|
|
if (controller.isChinaMainland.value) { |
|
|
|
buttons.add(_buildSocialButton( |
|
|
|
FontAwesomeIcons.weixin, Colors.green, isDarkMode)); |
|
|
|
} else if (GetPlatform.isAndroid) { |
|
|
|
buttons.add(_buildSocialButton( |
|
|
|
FontAwesomeIcons.google, Colors.red, isDarkMode)); |
|
|
|
} |
|
|
|
|
|
|
|
if (GetPlatform.isIOS) { |
|
|
|
buttons.add(_buildSocialButton( |
|
|
|
FontAwesomeIcons.apple, Colors.black, isDarkMode)); |
|
|
|
} |
|
|
|
|
|
|
|
if (controller.isGuestLoginVisible) { |
|
|
|
buttons.add(_buildSocialButton( |
|
|
|
FontAwesomeIcons.userSecret, Colors.black, isDarkMode)); |
|
|
|
} |
|
|
|
|
|
|
|
return Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
for (int i = 0; i < buttons.length; i++) ...[ |
|
|
|
if (i > 0) SizedBox(width: 24.w), |
|
|
|
buttons[i], |
|
|
|
], |
|
|
|
], |
|
|
|
); |
|
|
|
}, |
|
|
|
), |
|
|
|
], |
|
|
|
); |
|
|
|
|