This commit is contained in:
zhutao
2025-09-04 17:57:35 +08:00
parent 4d12f8afc2
commit 0231dcfe1a
34 changed files with 1339 additions and 368 deletions

View File

@@ -26,9 +26,6 @@ class LoginPage extends StatefulWidget {
class _LoginPageState extends State<LoginPage> {
var _subLoading = false;
///协议
bool _agree = false;
///谷歌登陆
final GoogleSignIn _googleSignIn = GoogleSignIn.instance;
@@ -80,11 +77,6 @@ class _LoginPageState extends State<LoginPage> {
///谷歌登录
void _handleGoogleSignIn() async {
if (!_agree) {
EasyLoading.showToast('Please read and agree to the terms first.');
return;
}
try {
// 如果用户未登录,则启动标准的 Google 登录
if (_googleSignIn.supportsAuthenticate()) {
@@ -120,11 +112,6 @@ class _LoginPageState extends State<LoginPage> {
///apple登录
void _handAppleSignIn() async {
if (!_agree) {
EasyLoading.showToast('Please read and agree to the terms first.');
return;
}
try {
final credential = await SignInWithApple.getAppleIDCredential(scopes: [AppleIDAuthorizationScopes.email, AppleIDAuthorizationScopes.fullName]);
EasyLoading.show(status: "Logging in...");
@@ -139,10 +126,6 @@ class _LoginPageState extends State<LoginPage> {
}
void _handSubmit() async {
if (!_agree) {
EasyLoading.showToast('Please read and agree to the terms first.');
return;
}
if (_emailController.text.isEmpty) {
//请输入邮箱
EasyLoading.showError("Please enter your email");
@@ -238,14 +221,7 @@ class _LoginPageState extends State<LoginPage> {
width: double.infinity,
margin: EdgeInsets.only(top: 40),
alignment: Alignment.center,
child: AgreementBox(
checked: _agree,
onChanged: (value) {
setState(() {
_agree = value;
});
},
),
child: AgreementBox(),
),
],
),