-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sign in #25
base: master
Are you sure you want to change the base?
Sign in #25
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See attached comments. we probably shouldn't work on this much more until we get the new home page merged (as that changes a significant amount of stuff up)
'https://www.googleapis.com/auth/contacts.readonly', | ||
], | ||
); | ||
static GoogleSignInAccount currentUser; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't need (if we use stream builder)
super.initState(); | ||
SignIn.googleSignIn.onCurrentUserChanged | ||
.listen((GoogleSignInAccount account) { | ||
setState(() { | ||
SignIn.currentUser = account; | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont do this. use stream builder
static GoogleSignIn googleSignIn = GoogleSignIn( | ||
scopes: <String>[ | ||
'email', | ||
'https://www.googleapis.com/auth/contacts.readonly', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this line for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm... I just forgot to get rid of it
static Future<void> handleSignIn() async { | ||
try { | ||
await SignIn.googleSignIn.signIn(); | ||
} catch (error) { | ||
print(error); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a redundant function (you should just catch an error wherever you attempt sign in so it can properly presented to user)
import 'package:google_sign_in/google_sign_in.dart'; | ||
|
||
class SignIn { | ||
static GoogleSignIn googleSignIn = GoogleSignIn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep this under getIt or just in the main file if it doesn't need multi file scope
@@ -0,0 +1,19 @@ | |||
import 'package:google_sign_in/google_sign_in.dart'; | |||
|
|||
class SignIn { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file (and class) isn't needed. see other comments
import 'package:flutter/material.dart'; | ||
import 'package:wpi_campus/services/sign_in.dart'; | ||
|
||
class SignInDemo extends StatefulWidget { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this before we merge pr
@@ -1,369 +0,0 @@ | |||
# Generated by pub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably don't want this file deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe pop it in git ignore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I just removed it from git, but I can double check. It shouldn't be in version control
No description provided.