Created
August 31, 2020 09:55
-
-
Save pradeeprjth/ed6e2246081bb7f8ee76d647978b9845 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool isLoggedIn = false; | |
void onLoginStatusChanged(bool isLoggedIn) { | |
setState(() { | |
this.isLoggedIn = isLoggedIn; | |
}); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text("Facebook Login"), | |
), | |
body: Container( | |
child: Center( | |
child: isLoggedIn | |
? Text("Logged In") | |
: RaisedButton( | |
child: Text("Login with Facebook"), | |
onPressed: () => initiateFacebookLogin(), | |
), | |
), | |
), | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment