credential method Null safety

OAuthCredential credential(
  1. {String? idToken,
  2. String? accessToken}
)

Create a new GoogleAuthCredential from a provided accessToken.

Implementation

static OAuthCredential credential({String? idToken, String? accessToken}) {
  assert(accessToken != null || idToken != null,
      'At least one of ID token and access token is required');
  return GoogleAuthCredential._credential(
    idToken: idToken,
    accessToken: accessToken,
  );
}