@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();
},
),
),
),
),
);
}
User contributions licensed under CC BY-SA 3.0