I am able to successfully - sign in a user using firebase using both Google and Facebook:
firebase_auth.dart, flutter_facebook_login.dart, google_sign_in.dart
I am able to sign out the firebase user using this function from a different widget:
Future<void>_signOut() async {
final FirebaseAuth _firebaseAuth = FirebaseAuth.instance;
return _firebaseAuth.signOut();
}
Now this is a catch-all for both types of logins, Google and Facebook, how can I determine if the user is a Google auth user in which case I can execute
final GoogleSignIn _googleSignIn = new GoogleSignIn();
...
_googleSignIn.signOut();
Additionally, if my sign out function is in a different widget and file how can I pass the GoogleSignIn object to be referenced to sign out?