Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address PR feedback
* Throw in some trailing commas to make dartfmt nicer
  • Loading branch information
ditman committed Nov 13, 2019
commit 7d626a8757881393868873102cf6484c50b0be17
33 changes: 21 additions & 12 deletions packages/google_sign_in/google_sign_in/lib/google_sign_in.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@ class GoogleSignInAccount implements GoogleIdentity {
throw StateError('User is no longer signed in.');
}

final GoogleSignInTokenData response = await GoogleSignInPlatform.instance
.getTokens(email: email, shouldRecoverAuth: true);
final GoogleSignInTokenData response =
await GoogleSignInPlatform.instance.getTokens(
email: email,
shouldRecoverAuth: true,
);

// On Android, there isn't an API for refreshing the idToken, so re-use
// the one we obtained on login.
Expand Down Expand Up @@ -147,14 +150,17 @@ class GoogleSignIn {
/// The [hostedDomain] argument specifies a hosted domain restriction. By
/// setting this, sign in will be restricted to accounts of the user in the
/// specified domain. By default, the list of accounts will not be restricted.
GoogleSignIn(
{this.signInOption = SignInOption.standard,
this.scopes = const <String>[],
this.hostedDomain});
GoogleSignIn({
this.signInOption = SignInOption.standard,
this.scopes = const <String>[],
this.hostedDomain,
});

/// Factory for creating default sign in user experience.
factory GoogleSignIn.standard(
{List<String> scopes = const <String>[], String hostedDomain}) {
factory GoogleSignIn.standard({
List<String> scopes = const <String>[],
String hostedDomain,
}) {
return GoogleSignIn(
signInOption: SignInOption.standard,
scopes: scopes,
Expand Down Expand Up @@ -247,8 +253,10 @@ class GoogleSignIn {
///
/// At most one in flight call is allowed to prevent concurrent (out of order)
/// updates to [currentUser] and [onCurrentUserChanged].
Future<GoogleSignInAccount> _addMethodCall(Function method,
{bool canSkipCall = false}) async {
Future<GoogleSignInAccount> _addMethodCall(
Function method, {
bool canSkipCall = false,
}) async {
Future<GoogleSignInAccount> response;
if (_lastMethodCall == null) {
response = _callMethod(method);
Expand Down Expand Up @@ -288,8 +296,9 @@ class GoogleSignIn {
/// returned Future completes with [PlatformException] whose `code` can be
/// either [kSignInRequiredError] (when there is no authenticated user) or
/// [kSignInFailedError] (when an unknown error occurred).
Future<GoogleSignInAccount> signInSilently(
{bool suppressErrors = true}) async {
Future<GoogleSignInAccount> signInSilently({
bool suppressErrors = true,
}) async {
try {
return await _addMethodCall(GoogleSignInPlatform.instance.signInSilently,
canSkipCall: true);
Expand Down