handleSignOut static method

Future<Null> handleSignOut(
  1. BuildContext context
)

Implementation

static Future<Null> handleSignOut(BuildContext context) async {
  await Firebase.initializeApp();
  final GoogleSignIn googleSignIn = GoogleSignIn();

  await FirebaseAuth.instance.signOut();
  await googleSignIn.disconnect();
  await googleSignIn.signOut();

  Navigator.pushReplacement(
      context, MaterialPageRoute(builder: (context) => LoginScreen()));
}