APIs that require
  service accounts should
  not be used directly from a Flutter application. Doing so requires shipping
  service credentials as part of your application, which is not secure. To use
  these APIs, we recommend creating an intermediate service.

Overview

To use Google APIs, follow these steps.

Pick the desired API

Enable the API

Authenticate user with the required scopes

Obtain an authenticated HTTP client

Create and use the desired API class

1. Pick the desired API

The documentation for package:googleapis lists
each API as a separate Dart library – in a name.version format. Let’s look at
youtube.v3
as an example.

Each library may provide many types, but there is one root class that ends in
Api. For YouTube, it’s
YouTubeApi.