When you instantiate the
GoogleSignIn
class, you provide the desired scopes as discussed in the previous section.

Follow the instructions provided by
package:google_sign_in to allow a user to
authenticate.

Once authenticated, you must obtain an authenticated HTTP client.

4. Obtain an authenticated HTTP client

The
extension_google_sign_in_as_googleapis_auth
package provides an
extension method on
GoogleSignIn:
authenticatedClient.

You can listen to
onCurrentUserChanged.
When event value is not null, you can create an authenticated client.

This Client instance
includes the nessesary credentials when invoking Google API classes.

5. Create and use the desired API class

Use the API to create the desired API type and call methods, for instance:

More information