_appleLogin() async {
if (await AppleSignIn.isAvailable()) {
final AuthorizationResult result = await AppleSignIn.performRequests([
AppleIdRequest(requestedScopes: [Scope.email, Scope.fullName])
]);
if (result.status == AuthorizationStatus.authorized){
print(result.credential.fullName.givenName);//All the required credentials
print(result.credential.fullName.familyName);//All the required credentials
print(result.credential.fullName.nickname);//All the required credentials
print(result.credential.user);//All the required credentials
print("Sign in email: ${result.credential.email}");
// push(VerifyUserScreenFromSocial(name:(result.credential.fullName).toString(),email:(result.credential.email).toString(),socialId:(result.credential.identityToken).toString()));
final body = json.decode(result.toString());
print(body.toString());
}else if (result.status == AuthorizationStatus.error){
print("Sign in failed: ${result.error.localizedDescription}");
}else{
print('User cancelled');
}
}else{
print('Apple SignIn is not available for your device');
}
}
_appleLogin() async { if (await AppleSignIn.isAvailable()) { final AuthorizationResult result = await AppleSignIn.performRequests([ AppleIdRequest(requestedScopes: [Scope.email, Scope.fullName])