Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Sign in #25

wants to merge 2 commits into from

Conversation

GabrielDeml
Copy link
Owner

No description provided.

Copy link
Collaborator

@GregoryConrad GregoryConrad left a 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;
Copy link
Collaborator

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)

Comment on lines +35 to +41
super.initState();
SignIn.googleSignIn.onCurrentUserChanged
.listen((GoogleSignInAccount account) {
setState(() {
SignIn.currentUser = account;
});
});
Copy link
Collaborator

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',
Copy link
Collaborator

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?

Copy link
Owner Author

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

Comment on lines +12 to +18
static Future<void> handleSignIn() async {
try {
await SignIn.googleSignIn.signIn();
} catch (error) {
print(error);
}
}
Copy link
Collaborator

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(
Copy link
Collaborator

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 {
Copy link
Collaborator

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 {
Copy link
Collaborator

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
Copy link
Collaborator

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

Copy link
Collaborator

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?

Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants