signIn method

Future<GoogleSignInAccount> signIn ()

Starts the interactive sign-in process.

Returned Future resolves to an instance of GoogleSignInAccount for a successful sign in or null in case sign in process was aborted.

Authentication process is triggered only if there is no currently signed in user (that is when currentUser == null), otherwise this method returns a Future which resolves to the same user instance.

Re-authentication can be triggered only after signOut or disconnect.


Future<GoogleSignInAccount> signIn() {
  final Future<GoogleSignInAccount> result = _addMethodCall('signIn');
  bool isCanceled(dynamic error) =>
      error is PlatformException && error.code == kSignInCanceledError;
  return result.catchError((dynamic _) => null, test: isCanceled);