skip to Main Content

The argument type 'String?' cant be assigned to the parameter type 'String'. I am trying to save the user information which we get from google sign in – Flutter

UserCredential result= await _firebaseAuth.signInWithCredential(credential); User? userDetails = result.user; if(result!= null) { SharedPreferenceHelper().saveUserEmail(userDetails.email); SharedPreferenceHelper().saveUserId(userDetails.uid); SharedPreferenceHelper().saveDisplayName(userDetails.displayName); SharedPreferenceHelper().saveUserProfileUrl(userDetails.photoURL); } This was my code, how can I reslove it? I tried replacing '.' with '?.' and '!.' however it is not working

VIEW QUESTION
Back To Top
Search