Repository: flutter
Issue: iOS: Platform View stops responding to GestureInput
Labels: platform-ios,framework,f: gestures,a: platform-views,has reproducible steps,P2,found in release: 2.1,team-ios,triaged-ios

Hello,

I use a MKMapView (Apple Maps) inside a PlatformView and it’s working fine.
But after using a SearchView (with showSearch) and dismissing it, the platformView is only responding to touch events for one more time.
After that, nothing happens if you try to move the map or zoom etc.
Every other flutter widget on screen is still working fine.

This affects both debug builds and release builds and it affects simulator (most of the time) and real devices (all the time).

I also uploaded a demo project on google drive, so you can reproduce the bug.
The bug occurs most of the time but if not, please close and restart the app and follow the steps again.

Video of bug:
[Link](https://drive.google.com/open?id=1IkhF7CTyfA3iROKyqp8OkvOcBb7f9M9U) 
Demo project:
[Link](https://drive.google.com/open?id=15Q3mqJCrsx6ttVlmNL56YIzfxkuDCOFk) 

## Steps to Reproduce

<!--
     Please tell us exactly how to reproduce the problem you are running into.

     Please attach a small application (ideally just one main.dart file) that
     reproduces the problem. You could use https://gist.github.com/ for this.

     If the problem is with your application's rendering, then please attach
     a screenshot and explain what the problem is.
-->

1. Move the map (then wait until touch is finished / animation finished)
2. Press SearchButton
3. Press dismiss button (in the top left corner)
4. Move the Map (then wait until touch is finished / animation finished)
5. Try to move the map again -> Map not moving/interactive anymore
If the map is still interactive, repeat steps 2 through 5
If the bug still not occurs, try closing and reopening the app and follow the steps again.

## Logs

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue.
-->

```
[+16700 ms] [DEVICE LOG] 2019-08-03 19:13:35.431071+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124b5b, Description: send gesture actions
[  +38 ms] [DEVICE LOG] 2019-08-03 19:13:35.468868+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124b5c, Description: send gesture actions
[        ] [DEVICE LOG] 2019-08-03 19:13:35.469011+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124b5d, Description: send gesture actions
[  +14 ms] [DEVICE LOG] 2019-08-03 19:13:35.485203+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124b5e, Description: send gesture actions
[        ] [DEVICE LOG] 2019-08-03 19:13:35.485516+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124b5f, Description: send gesture actions
[  +16 ms] [DEVICE LOG] 2019-08-03 19:13:35.501697+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e00, Description: send gesture actions
[        ] [DEVICE LOG] 2019-08-03 19:13:35.502253+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e01, Description: send gesture actions
[        ] [DEVICE LOG] 2019-08-03 19:13:35.502346+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e02, Description: send gesture actions
[ +199 ms] [DEVICE LOG] 2019-08-03 19:13:35.699206+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e03, Description: send gesture actions
[   +2 ms] [DEVICE LOG] 2019-08-03 19:13:35.699953+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e04, Description: send gesture actions
[ +181 ms] [DEVICE LOG] 2019-08-03 19:13:35.884511+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e05, Description: send gesture actions
[        ] [DEVICE LOG] 2019-08-03 19:13:35.885436+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e06, Description: send gesture actions
[ +193 ms] [DEVICE LOG] 2019-08-03 19:13:36.078856+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e07, Description: send gesture actions
[   +2 ms] [DEVICE LOG] 2019-08-03 19:13:36.079591+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e08, Description: send gesture actions
[ +178 ms] [DEVICE LOG] 2019-08-03 19:13:36.259984+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e09, Description: send gesture actions
[   +1 ms] [DEVICE LOG] 2019-08-03 19:13:36.260367+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e0a, Description: send gesture actions
[ +189 ms] [DEVICE LOG] 2019-08-03 19:13:36.450115+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e0b, Description: send gesture actions
[   +1 ms] [DEVICE LOG] 2019-08-03 19:13:36.451050+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e0c, Description: send gesture actions
[ +186 ms] [DEVICE LOG] 2019-08-03 19:13:36.639542+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e0d, Description: send gesture actions
[   +2 ms] [DEVICE LOG] 2019-08-03 19:13:36.640424+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e0e, Description: send gesture actions
[ +182 ms] [DEVICE LOG] 2019-08-03 19:13:36.822902+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e0f, Description: send gesture actions
[        ] [DEVICE LOG] 2019-08-03 19:13:36.823640+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e50, Description: send gesture actions
[ +183 ms] [DEVICE LOG] 2019-08-03 19:13:37.008348+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e51, Description: send gesture actions
[        ] [DEVICE LOG] 2019-08-03 19:13:37.009338+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e52, Description: send gesture actions
[ +184 ms] [DEVICE LOG] 2019-08-03 19:13:37.193897+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e53, Description: send gesture actions
[   +2 ms] [DEVICE LOG] 2019-08-03 19:13:37.194664+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e54, Description: send gesture actions
[ +185 ms] [DEVICE LOG] 2019-08-03 19:13:37.379020+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e55, Description: send gesture actions
[        ] [DEVICE LOG] 2019-08-03 19:13:37.379704+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e56, Description: send gesture actions
[ +181 ms] [DEVICE LOG] 2019-08-03 19:13:37.563925+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e57, Description: send gesture actions
[   +2 ms] [DEVICE LOG] 2019-08-03 19:13:37.564301+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e58, Description: send gesture actions
[ +357 ms] [DEVICE LOG] 2019-08-03 19:13:37.922696+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e59, Description: send gesture actions
[        ] [DEVICE LOG] 2019-08-03 19:13:37.922928+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e5a, Description: send gesture actions
[        ] [DEVICE LOG] 2019-08-03 19:13:37.923770+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e5b, Description: send gesture actions
[+2181 ms] [DEVICE LOG] 2019-08-03 19:13:40.107651+0200  localhost Runner[30814]: (AXRuntime) [com.apple.Accessibility:AXRuntimeCommon] This class 'FlutterSemanticsObject' is not a known serializable element and returning it as an
accessibility element may lead to crashes
[  +13 ms] [DEVICE LOG] 2019-08-03 19:13:40.120996+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e5c, Description: send gesture actions
[  +92 ms] [DEVICE LOG] 2019-08-03 19:13:40.210532+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124e5d, Description: send gesture actions
[  +14 ms] [DEVICE LOG] 2019-08-03 19:13:40.227109+0200  localhost Runner[30814]: (Flutter) flutter: Test
[        ] flutter: Test
[ +390 ms] [DEVICE LOG] 2019-08-03 19:13:40.618156+0200  localhost Runner[30814]: (CallKit) [com.apple.calls.callkit:Default] Call host has no calls
[   +9 ms] [DEVICE LOG] 2019-08-03 19:13:40.627397+0200  localhost Runner[30814]: (CoreFoundation) Created Activity ID: 0x124e5e, Description: Updating Key-Value Observers Of Preferences
[   +4 ms] [DEVICE LOG] 2019-08-03 19:13:40.630439+0200  localhost Runner[30814]: (UIKitCore) [com.apple.UIKit:FeedbackActivation] activate generator with style: TurnOn; activationCount: 0 -> 1; styleActivationCount: 0 -> 1;
<_UIKeyboardFeedbackGenerator: 0x600007e00000>
[   +1 ms] [DEVICE LOG] 2019-08-03 19:13:40.630645+0200  localhost Runner[30814]: (UIKitCore) [com.apple.UIKit:Feedback] activate engine <_UIFeedbackSystemSoundEngine: 0x60000239a140>, clientCount: 0 -> 1
[   +1 ms] [DEVICE LOG] 2019-08-03 19:13:40.630729+0200  localhost Runner[30814]: (UIKitCore) [com.apple.UIKit:Feedback] activating engine <_UIFeedbackSystemSoundEngine: 0x60000239a140>
[        ] [DEVICE LOG] 2019-08-03 19:13:40.631095+0200  localhost Runner[30814]: (UIKitCore) [com.apple.UIKit:Feedback] engine <_UIFeedbackSystemSoundEngine: 0x60000239a140: state=3, numberOfClients=1, prewarmCount=0,
_internal_isSuspended=0> state changed: Inactive -> Activating
[   +1 ms] [DEVICE LOG] 2019-08-03 19:13:40.631289+0200  localhost Runner[30814]: (UIKitCore) [com.apple.UIKit:Feedback] engine <_UIFeedbackSystemSoundEngine: 0x60000239a140: state=4, numberOfClients=1, prewarmCount=0,
_internal_isSuspended=0> state changed: Activating -> Running
[        ] [DEVICE LOG] 2019-08-03 19:13:40.635018+0200  localhost Runner[30814]: (RunningBoardServices) Created Activity ID: 0x124e5f, Description: didChangeInheritances
[+1595 ms] [DEVICE LOG] 2019-08-03 19:13:42.233585+0200  localhost Runner[30814]: (AXRuntime) [com.apple.Accessibility:AXRuntimeCommon] This class 'FlutterSemanticsObject' is not a known serializable element and returning it as an
accessibility element may lead to crashes
[  +19 ms] [DEVICE LOG] 2019-08-03 19:13:42.252617+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124ef0, Description: send gesture actions
[  +62 ms] [DEVICE LOG] 2019-08-03 19:13:42.315455+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124ef1, Description: send gesture actions
[  +25 ms] [DEVICE LOG] 2019-08-03 19:13:42.336119+0200  localhost Runner[30814]: (UIKitCore) [com.apple.UIKit:FeedbackActivation] deactivate generator with style: TurnOn; activationCount: 1 -> 0; styleActivationCount: 1 -> 0;
<_UIKeyboardFeedbackGenerator: 0x600007e00000>
[        ] [DEVICE LOG] 2019-08-03 19:13:42.336203+0200  localhost Runner[30814]: (UIKitCore) [com.apple.UIKit:Feedback] deactivate engine <_UIFeedbackSystemSoundEngine: 0x60000239a140>, clientCount: 1 -> 0
[        ] [DEVICE LOG] 2019-08-03 19:13:42.336260+0200  localhost Runner[30814]: (UIKitCore) [com.apple.UIKit:Feedback] _internal_deactivateEngineIfPossible <_UIFeedbackSystemSoundEngine: 0x60000239a140>, clientCount: 0, suspended: 0
[        ] [DEVICE LOG] 2019-08-03 19:13:42.336313+0200  localhost Runner[30814]: (UIKitCore) [com.apple.UIKit:Feedback] _internal_deactivateEngineIfPossible <_UIFeedbackSystemSoundEngine: 0x60000239a140> tearedDown: 1
[        ] [DEVICE LOG] 2019-08-03 19:13:42.336436+0200  localhost Runner[30814]: (UIKitCore) [com.apple.UIKit:Feedback] engine <_UIFeedbackSystemSoundEngine: 0x60000239a140: state=0, numberOfClients=0, prewarmCount=0,
_internal_isSuspended=0> state changed: Running -> Inactive
[+4715 ms] [DEVICE LOG] 2019-08-03 19:13:47.059008+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124ef2, Description: send gesture actions
[  +16 ms] [DEVICE LOG] 2019-08-03 19:13:47.075408+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124ef3, Description: send gesture actions
[        ] [DEVICE LOG] 2019-08-03 19:13:47.075785+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124ef4, Description: send gesture actions
[ +197 ms] [DEVICE LOG] 2019-08-03 19:13:47.269943+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124ef5, Description: send gesture actions
[ +190 ms] [DEVICE LOG] 2019-08-03 19:13:47.458765+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124ef6, Description: send gesture actions
[ +176 ms] [DEVICE LOG] 2019-08-03 19:13:47.638649+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124ef7, Description: send gesture actions
[ +186 ms] [DEVICE LOG] 2019-08-03 19:13:47.825529+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124ef8, Description: send gesture actions
[ +347 ms] [DEVICE LOG] 2019-08-03 19:13:48.171989+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124ef9, Description: send gesture actions
[        ] [DEVICE LOG] 2019-08-03 19:13:48.172199+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124efa, Description: send gesture actions
[+2893 ms] [DEVICE LOG] 2019-08-03 19:13:51.067636+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124efb, Description: send gesture actions
[ +736 ms] [DEVICE LOG] 2019-08-03 19:13:51.804476+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124efc, Description: send gesture actions
[ +722 ms] [DEVICE LOG] 2019-08-03 19:13:52.526711+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124efd, Description: send gesture actions
[ +496 ms] [DEVICE LOG] 2019-08-03 19:13:53.022698+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124efe, Description: send gesture actions
[ +460 ms] [DEVICE LOG] 2019-08-03 19:13:53.483232+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x124eff, Description: send gesture actions
[+1404 ms] [DEVICE LOG] 2019-08-03 19:13:54.887590+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x125110, Description: send gesture actions
[ +367 ms] [DEVICE LOG] 2019-08-03 19:13:55.255056+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x125111, Description: send gesture actions
[ +337 ms] [DEVICE LOG] 2019-08-03 19:13:55.592560+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x125112, Description: send gesture actions
[ +229 ms] [DEVICE LOG] 2019-08-03 19:13:55.821816+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x125113, Description: send gesture actions
[ +265 ms] [DEVICE LOG] 2019-08-03 19:13:56.087905+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x125114, Description: send gesture actions
[ +214 ms] [DEVICE LOG] 2019-08-03 19:13:56.302801+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x125115, Description: send gesture actions
[ +231 ms] [DEVICE LOG] 2019-08-03 19:13:56.534156+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x125116, Description: send gesture actions
[ +244 ms] [DEVICE LOG] 2019-08-03 19:13:56.778616+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x125117, Description: send gesture actions
[ +247 ms] [DEVICE LOG] 2019-08-03 19:13:57.025819+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x125118, Description: send gesture actions
[ +201 ms] [DEVICE LOG] 2019-08-03 19:13:57.226882+0200  localhost Runner[30814]: (UIKitCore) Created Activity ID: 0x125119, Description: send gesture actions
```

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
Maximilians-iMac:testproject maximilian$ flutter analyze
Analyzing testproject...                                                
No issues found! (ran in 2.7s)
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[✓] Flutter (Channel dev, v1.8.3, on Mac OS X 10.14.5 18F132, locale de-DE)
    • Flutter version 1.8.3 at /Users/maximilian/Documents/Flutter/flutter-sdk
    • Framework revision e4ebcdf6f4 (7 days ago), 2019-07-27 11:48:24 -0700
    • Engine revision 38ac5f30a7
    • Dart version 2.5.0 (build 2.5.0-dev.1.0 0ca1582afd)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at /Users/maximilian/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
    • Xcode at /Applications/Xcode-beta.app/Contents/Developer
    • Xcode 11.0, Build version 11M382q
    • CocoaPods version 1.6.1

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 38.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] VS Code (version 1.36.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.3.0

[✓] Connected device (1 available)
    • iPhone Xʀ • D41B7C5A-A833-4394-BAF7-9AD58713D067 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-0 (simulator)

• No issues found!
```