Future<Null> _signOut() async { await _auth.signOut(); this.setState(() { isLoading = false; }); Navigator.of(context).pushAndRemoveUntil( MaterialPageRoute(builder: (context) => MyApp()), (Route<dynamic> route) => false); }