Repository: flutter
Issue: [iOS] Application may freeze if `Navigator.pop` is called while holding the `swipeBackGesture`
Labels: platform-ios,framework,f: routes,has reproducible steps,P2,found in release: 2.5,found in release: 2.6,team-ios,triaged-ios


## Steps to Reproduce

An application freeze occurs  when  user uses swipe back gesture on IOS  and Navigator.pop() is called.

```
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Screen(),
    );
  }
}

class Screen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("First Screen"),
      ),
      body: Center(
        child: TextButton(
          onPressed: () {
            Navigator.of(context).push(
              MaterialPageRoute(
                builder: (context) {
                  return SecondScreen();
                },
              ),
            );
          },
          child: Text('Next Screen'),
        ),
      ),
    );
  }
}

class SecondScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Second Screen"),
      ),
      body: Center(
        child: TextButton(
          onPressed: () async {
            await Future.delayed(Duration(seconds: 1));
            Navigator.of(context).pop();
          },
          child: Text('Go Back'),
        ),
      ),
    );
  }
}
```
**Expected results:** 

Navigation happened and gesture is canceled

**Actual results:** 

Application freezes.

https://user-images.githubusercontent.com/15684133/125729637-d2ae00a4-64bc-4a5d-88ea-9984e1659eb8.mp4


<details>
  <summary>Logs</summary>

```console
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale ru)
    • Flutter version 2.2.3 at /Users/Development/flutter
    • Framework revision f4abaa0735 (2 weeks 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 /Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at:
      Library/Java/JavaVirtualMachines/corretto-11.0.11/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment Corretto-11.0.11.9.1 (build
      11.0.11+9-LTS)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5, Build version 12E262
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from
      https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup
      for detailed instructions).

[✓] IntelliJ IDEA Ultimate Edition (version 2021.1.3)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 58.0.3
    • Dart plugin version 211.7665

[✓] IntelliJ IDEA Community Edition (version 2021.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 57.0.5
    • Dart plugin version 211.7665

[✓] Connected device (2 available)
    • iPhone (itweb) (mobile) • 00008020-001A701C3A09002E • ios            • iOS
      14.4
    • Chrome (web)            • chrome                    • web-javascript •
      Google Chrome 91.0.4472.114

! Doctor found issues in 1 category.
```
</details>