Repository: flutter
Issue: [google_sign_in] PlatformException is thrown when cancelling signIn
Labels: customer: crowd,p: google_sign_in,package,team-ecosystem,has reproducible steps,P2,found in release: 2.2,found in release: 2.4,triaged-ecosystem

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- You must include full steps to reproduce so that we can reproduce the problem. -->

1. Create a new Flutter application on stable/beta/dev/master (reproduces on stable and master, haven't tested on beta or dev).
2. Replace main.dart with the code found [here](https://raw.githubusercontent.com/flutter/plugins/master/packages/google_sign_in/google_sign_in/example/lib/main.dart)
3. Run the application in debug mode
4. Press the "SIGN IN" button
5. Cancel the sign in by backing out of the screen

**Expected results:** <!-- what did you want to see? -->

I expected the exception to be caught (even though the `signIn()` method shouldn't even throw an exception when you cancel sign-in) and it wasn't. In the example code, it should print the exception yet nothing was printed in the console.

**Actual results:** <!-- what did you see? -->

The `signIn()` method threw a `PlatformException` when it shouldn't and the exception wasn't caught by the code since nothing was printed to the console.

<details>
  <summary>Versions</summary>

Master Version:

```
Flutter 2.3.0-17.0.pre.636 • channel master • https://github.com/flutter/flutter.git
Framework • revision 0c90c4885e (37 minutes ago) • 2021-07-02 12:26:04 -0400        
Engine • revision 2eab395ee2
Tools • Dart 2.14.0 (build 2.14.0-271.0.dev)
```

Stable version

```
Flutter 2.2.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f4abaa0735 (21 hours ago) • 2021-07-01 12:46:11 -0700
Engine • revision 241c87ad80
Tools • Dart 2.13.4
```

</details>

<details>
  <summary>Logs</summary>

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19043.1081], locale en-US)
    • Flutter version 2.2.3 at C:\dev\flutter
    • Framework revision f4abaa0735 (21 hours ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) 
    • Android SDK at C:\Users\thesl\AppData\Local\Android\Sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\thesl\AppData\Local\Android\Sdk
    • ANDROID_SDK_ROOT = C:\Users\thesl\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java       
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] IntelliJ IDEA Ultimate Edition (version 2020.2)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2020.2
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart

[√] VS Code (version 1.57.1)
    • VS Code at C:\Users\thesl\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.24.0

[√] Connected device (1 available)
    • SM G998U (mobile) • R5CR110SMVN • android-arm64 • Android 11 (API 30)

• No issues found!
```

</details>