signIn method

  1. @override
Future<GoogleSignInAccount?> signIn()
override

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.

Implementation

@override
Future<GoogleSignInAccount?> signIn() {
  _currentUser = MockGoogleSignInAccount();
  return Future.value(_isCancelled ? null : _currentUser);
}