linkWithCredential method

Future<UserCredential> linkWithCredential(
  1. AuthCredential credential
)

Links the user account with the given credentials.

credential The auth credential to link with.

Returns a Future containing the user credential.

Example:

var cred = await user.linkWithCredential(myCredential);

Implementation

Future<UserCredential> linkWithCredential(AuthCredential credential) async {
  await _userHelper.linkWithCredentialHelper(
    client: createClient(_auth.app),
    user: this,
    credential: credential,
  );
  await reload();
  var newCreds = UserCredential(user: this, credential: credential);
  return newCreds;
}