link method

  1. @override
Future<void> link(
  1. AuthCredential credential
)
inherited

Implementation

@override
Future<void> link(AuthCredential credential) async {
  final user = auth.currentUser;

  if (user != null) {
    try {
      await user.linkWithCredential(credential);
    } on Exception catch (err) {
      value = AuthFailed(err);
    }
  } else {
    throw Exception(
      "Can't link the credential: no user is currently signed in",
    );
  }
}