title: Flutter+Firebase error upgrading anonymous user to GoogleSignIn (Given String is empty or null)
body: <p>I have an anonymous account in Flutter and am trying to upgrade it using an AuthCredential from Google. I have verified the credential is created with what appears to be a valid accessToken and idToken.</p>
  
  <p>So if <code>auth.currentUser()</code> is my anonymous FirebaseUser, calling <code>linkAccountToGoogle()</code> below causes the error.</p>
  
  <pre><code>/// Upgrade an anonymous account by linking it to a Google account.
  Future&lt;FirebaseUser&gt; linkAccountToGoogle() async {
    final credential = await _getGoogleAuthCredential();
    if (credential != null) {
      try {
        return auth.linkWithCredential(credential);  // &lt;=== THROWS ERROR
      } catch (e) {
        print(e);
      }
    }
    return null;
  }
  
  /// Tries to sign-in silently first. May return `null`.
  Future&lt;AuthCredential&gt; _getGoogleAuthCredential() async {
    GoogleSignInAccount account;
    try {
      account = await _googleAuthService.signInSilently() ??
          await _googleAuthService.signIn();
    } catch (e) {
      print(e);
    }
    final googleAuth = await account?.authentication;
    if (account == null) {
      print('Unable to retrieve Google account.');
    } else if (googleAuth == null) {
      print('Unable to authenticate to Google account (${account.email}).');
    } else {
      // print(
      //     'accessToken: ${googleAuth.accessToken}, idToken: ${googleAuth.idToken}');
      return GoogleAuthProvider.getCredential(
          accessToken: googleAuth.accessToken, idToken: googleAuth.idToken);
    }
    return null;
  }
  </code></pre>
  
  <p>Stacktrace</p>
  
  <pre><code>I/flutter ( 3038): Credential: Instance of 'AuthCredential'
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038): Failed to handle method call
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038): java.lang.IllegalArgumentException: Given String is empty or null
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038):        at com.google.android.gms.common.internal.Preconditions.checkNotEmpty(Unknown Source:5)
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038):        at com.google.firebase.auth.EmailAuthProvider.getCredential(Unknown Source:2)
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038):        at io.flutter.plugins.firebaseauth.FirebaseAuthPlugin.handleLinkWithEmailAndPassword(FirebaseAuthPlugin.java:272)
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038):        at io.flutter.plugins.firebaseauth.FirebaseAuthPlugin.onMethodCall(FirebaseAuthPlugin.java:122)
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038):        at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:200)
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038):        at io.flutter.view.FlutterNativeView$PlatformMessageHandlerImpl.handlePlatformMessage(FlutterNativeView.java:188)
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038):        at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:202)
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038):        at android.os.MessageQueue.nativePollOnce(Native Method)
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038):        at android.os.MessageQueue.next(MessageQueue.java:325)
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038):        at android.os.Looper.loop(Looper.java:142)
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038):        at android.app.ActivityThread.main(ActivityThread.java:6694)
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038):        at java.lang.reflect.Method.invoke(Native Method)
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038):        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
  E/MethodChannel#plugins.flutter.io/firebase_auth( 3038):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769)
  E/flutter ( 3038): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(error, Given String is empty or null, null)
  E/flutter ( 3038): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
  E/flutter ( 3038): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:302:33)
  E/flutter ( 3038): &lt;asynchronous suspension&gt;
  E/flutter ( 3038): #2      FirebaseAuth.linkWithCredential (file:///home/jacob/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.8.0+1/lib/src/firebase_auth.dart:371:54)
  </code></pre>
  
  <p><strong>What I've tried</strong></p>
  
  <p>The Google account I am trying to link to was already a user for the project, so I deleted that google user from the Firebase console. Then tried again using <code>flutter clean</code> <code>flutter run</code>.</p>