Closed zyllus17 closed 2 years ago
The FacebookLoginStatus enum should be in lower case instead of uppercase
FacebookLoginStatus
@override Future<User> signInWithFacebook() async { final fb = FacebookLogin(); final response = await fb.logIn(permissions: [ FacebookPermission.publicProfile, FacebookPermission.email, ]); switch (response.status) { case FacebookLoginStatus.success: final accessToken = response.accessToken; final userCredential = await _firebaseAuth.signInWithCredential( FacebookAuthProvider.credential(accessToken.token), ); return userCredential.user; case FacebookLoginStatus.cancel: throw FirebaseAuthException( code: 'ERROR_ABORTED_BY_USER', message: 'Sign in aborted by user', ); case FacebookLoginStatus.error: throw FirebaseAuthException( code: 'ERROR_FACEBOOK_LOGIN_FAILED', message: response.error.developerMessage, ); default: throw UnimplementedError(); } }
A lot of stuff is depreciated in the tutorial, closing the PR.
The
FacebookLoginStatus
enum should be in lower case instead of uppercase