Skip to content

Instantly share code, notes, and snippets.

@ijoschek ijoschek/.\lib\scr\home.dart Secret
Created Dec 4, 2018

Embed
What would you like to do?
flutter_auth_tut
class _Home extends State<StatefulWidget> {
var mUser;
var mUserName;
var isLoggingIn = false;
Future clickLogin() async {
//Set isLoggingIn to true at the start of clicking Login
setState(() {
isLoggingIn = true;
});
mUser = await loginWithGoogle().catchError((e) => setState(() {
isLoggingIn = false;
}));
assert(mUser != null);
setState(() {
isLoggingIn = false;
mUserName = mUser.displayName;
});
}
@override
Widget build(BuildContext context) {
//...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.