not navigate to next page : Navigator operation requested with a context that does not include a Navigator

0
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(
      home: Scaffold(
        appBar: new AppBar(
          backgroundColor: Colors.red,
          elevation: 0.0,
          title: Center(
            child: Text("Notification",
                style: TextStyle(
                    fontFamily: 'Poppins', fontWeight: FontWeight.w600)),
          ),
          actions: <Widget>[
            new IconButton(
              icon: new Icon(
                Icons.email,
                color: Color(0xFFFFFFFF),
              ),
              onPressed: () {
                    Navigator.of(context).push(MaterialPageRoute(builder: (context) => fullscrn()));
              }
            ),
          ],
        ),
        body: Center(
            child:
            _isLoggedIn
                ? Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                Image.network(_googleSignIn.currentUser.photoUrl, height: 50.0, width: 50.0,),
                Text(_googleSignIn.currentUser.displayName),
                OutlineButton( child: Text("Logout"), onPressed: (){
                  _logout();
                },)
              ],
            )
                : Center(
              child: OutlineButton(
                child: Text("Login with Google"),
                onPressed: () {
                  _login();
                },
              ),
            ),
        ),

      ),
    );
  }
navigation
asked on Stack Overflow Sep 2, 2020 by Ah Zeem khatib • edited Sep 2, 2020 by RobertS supports Monica Cellio

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0