<h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">Create a view with a text input, and a submit callback listener. In the submit listener, call something like <code class="notranslate">Navigator.popAndPushNamed()</code>. This will result in the following error message:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E/flutter (11330): 'package:flutter/src/widgets/routes.dart': Failed assertion: line 200 pos 12: '!_transitionCompleter.isCompleted': Cannot reuse a MaterialPageRoute after disposing it."><pre class="notranslate"><code class="notranslate">E/flutter (11330): 'package:flutter/src/widgets/routes.dart': Failed assertion: line 200 pos 12: '!_transitionCompleter.isCompleted': Cannot reuse a MaterialPageRoute after disposing it.
</code></pre></div>
<p dir="auto">Probably not the best error message to read.</p>
<p dir="auto">Through a conversation on the flutter gitter I found that dismissing the keyboard using <code class="notranslate">Focus.clear(context);</code> before popping the view resolved the error.</p>
<p dir="auto">I propose the error message is changed to be more helpful towards this (seemingly quite common) error case - something like 'If you're popping and pushing a route with a text input, make sure you dismiss the keyboard using <code class="notranslate">Focus.clear(BuildContext)</code> before changing the route. Failing to do this results in the navigator trying to double-pop the keyboard.` or something along those lines!</p>
<p dir="auto">I'd quite like to open a PR for this, I just want to check I haven't totally misunderstood what's going on underneath the hood!</p>
<p dir="auto">Thanks,</p>
<p dir="auto">Tom</p>
<h2 dir="auto">Steps to Reproduce</h2>

<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/34681083/52030061-1de7c380-256a-11e9-880f-da07f00c93d2.gif"><img src="https://user-images.githubusercontent.com/34681083/52030061-1de7c380-256a-11e9-880f-da07f00c93d2.gif" alt="gif" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto">Video: <a href="https://i.imgur.com/A85IETe.mp4" rel="nofollow">https://i.imgur.com/A85IETe.mp4</a></p>
<ol dir="auto">
<li>Install Flutter Gallery on iOS simulator</li>
<li>Open and close any sample using the swipe mechanism</li>
<li>After a few successful swipes pick up the pace of opening and closing the sample</li>
<li>Crashes</li>
</ol>
<h2 dir="auto">Logs</h2>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="flutter: ══╡ EXCEPTION CAUGHT BY ANIMATION LIBRARY ╞═════════════════════════════════════════════════════════
flutter: The following assertion was thrown while notifying status listeners for AnimationController:
flutter: Cannot reuse a MaterialPageRoute&lt;dynamic&gt; after disposing it.
flutter: 'package:flutter/src/widgets/routes.dart': Failed assertion: line 218 pos 12:
flutter: '!_transitionCompleter.isCompleted'
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter:   https://github.com/flutter/flutter/issues/new?template=BUG.md
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2      TransitionRoute.didPopNext (package:flutter/src/widgets/routes.dart:218:12)
flutter: #3      NavigatorState.pop (package:flutter/src/widgets/navigator.dart:1944:23)
flutter: #4      _CupertinoBackGestureController._handleStatusChanged (package:flutter/src/cupertino/route.dart:651:17)
flutter: #5      _AnimationController&amp;Animation&amp;AnimationEagerListenerMixin&amp;AnimationLocalListenersMixin&amp;AnimationLocalStatusListenersMixin.notifyStatusListeners (package:flutter/src/animation/listener_helpers.dart:192:19)
flutter: #6      AnimationController._checkStatusChanged (package:flutter/src/animation/animation_controller.dart:736:7)
flutter: #7      AnimationController._tick (package:flutter/src/animation/animation_controller.dart:752:5)
flutter: #8      Ticker._tick (package:flutter/src/scheduler/ticker.dart:228:5)
flutter: #9      _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
flutter: #10     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding.handleBeginFrame.&lt;anonymous closure&gt; (package:flutter/src/scheduler/binding.dart:906:11)
flutter: #11     __InternalLinkedHashMap&amp;_HashVMBase&amp;MapMixin&amp;_LinkedHashMapMixin.forEach (dart:collection/runtime/libcompact_hash.dart:367:8)
flutter: #12     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding.handleBeginFrame (package:flutter/src/scheduler/binding.dart:904:17)
flutter: #13     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding._handleBeginFrame (package:flutter/src/scheduler/binding.dart:834:5)
flutter: #17     _invoke1 (dart:ui/hooks.dart:203:10)
flutter: #18     _beginFrame (dart:ui/hooks.dart:156:3)
flutter: (elided 5 frames from class _AssertionError and package dart:async)
flutter:
flutter: The AnimationController notifying status listeners was:
flutter:   AnimationController#f0974(⏮ 0.000; paused; DISPOSED; for
flutter:   MaterialPageRoute&lt;dynamic&gt;(/cupertino/alert))
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
"><pre class="notranslate"><code class="notranslate">flutter: ══╡ EXCEPTION CAUGHT BY ANIMATION LIBRARY ╞═════════════════════════════════════════════════════════
flutter: The following assertion was thrown while notifying status listeners for AnimationController:
flutter: Cannot reuse a MaterialPageRoute&lt;dynamic&gt; after disposing it.
flutter: 'package:flutter/src/widgets/routes.dart': Failed assertion: line 218 pos 12:
flutter: '!_transitionCompleter.isCompleted'
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter:   https://github.com/flutter/flutter/issues/new?template=BUG.md
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2      TransitionRoute.didPopNext (package:flutter/src/widgets/routes.dart:218:12)
flutter: #3      NavigatorState.pop (package:flutter/src/widgets/navigator.dart:1944:23)
flutter: #4      _CupertinoBackGestureController._handleStatusChanged (package:flutter/src/cupertino/route.dart:651:17)
flutter: #5      _AnimationController&amp;Animation&amp;AnimationEagerListenerMixin&amp;AnimationLocalListenersMixin&amp;AnimationLocalStatusListenersMixin.notifyStatusListeners (package:flutter/src/animation/listener_helpers.dart:192:19)
flutter: #6      AnimationController._checkStatusChanged (package:flutter/src/animation/animation_controller.dart:736:7)
flutter: #7      AnimationController._tick (package:flutter/src/animation/animation_controller.dart:752:5)
flutter: #8      Ticker._tick (package:flutter/src/scheduler/ticker.dart:228:5)
flutter: #9      _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
flutter: #10     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding.handleBeginFrame.&lt;anonymous closure&gt; (package:flutter/src/scheduler/binding.dart:906:11)
flutter: #11     __InternalLinkedHashMap&amp;_HashVMBase&amp;MapMixin&amp;_LinkedHashMapMixin.forEach (dart:collection/runtime/libcompact_hash.dart:367:8)
flutter: #12     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding.handleBeginFrame (package:flutter/src/scheduler/binding.dart:904:17)
flutter: #13     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding._handleBeginFrame (package:flutter/src/scheduler/binding.dart:834:5)
flutter: #17     _invoke1 (dart:ui/hooks.dart:203:10)
flutter: #18     _beginFrame (dart:ui/hooks.dart:156:3)
flutter: (elided 5 frames from class _AssertionError and package dart:async)
flutter:
flutter: The AnimationController notifying status listeners was:
flutter:   AnimationController#f0974(⏮ 0.000; paused; DISPOSED; for
flutter:   MaterialPageRoute&lt;dynamic&gt;(/cupertino/alert))
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1507 pos 12: '!_debugLocked': is not true.

</code></pre></div>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Analyzing flutter_gallery...
No issues found! (ran in 5.6s)"><pre class="notranslate"><code class="notranslate">Analyzing flutter_gallery...
No issues found! (ran in 5.6s)
</code></pre></div>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel master, v1.2.1-pre.50, on Mac OS X 10.14.2, locale en-US)
    • Flutter version 1.2.1-pre.50 at /Users/droidery/flutter
    • Framework revision dbd1b317ff (76 minutes ago), 2019-01-30 21:31:44 -0500
    • Engine revision 15f2b92cce
    • Dart version 2.1.1 (build 2.1.1-dev.3.2 71bee8f05e)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/droidery/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • 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-1248-b01)
    • All Android licenses accepted.

[!] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    ✗ Verify that all connected devices have been paired with this computer in Xcode.
      If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
      To update with Brew, run:
        brew update
        brew uninstall --ignore-dependencies libimobiledevice
        brew uninstall --ignore-dependencies usbmuxd
        brew install --HEAD usbmuxd
        brew unlink usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 31.3.3
    • Dart plugin version 182.5124
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] IntelliJ IDEA Community Edition (version 2018.3.4)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 32.0.3
    • Dart plugin version 183.5429.25

[✓] VS Code (version 1.30.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.22.2

[✓] Connected device (1 available)
    • iPhone SE • 58F34A3E-1576-453E-B1B4-3DCB22E1FEDD • ios • iOS 12.1 (simulator)"><pre class="notranslate"><code class="notranslate">[✓] Flutter (Channel master, v1.2.1-pre.50, on Mac OS X 10.14.2, locale en-US)
    • Flutter version 1.2.1-pre.50 at /Users/droidery/flutter
    • Framework revision dbd1b317ff (76 minutes ago), 2019-01-30 21:31:44 -0500
    • Engine revision 15f2b92cce
    • Dart version 2.1.1 (build 2.1.1-dev.3.2 71bee8f05e)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/droidery/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • 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-1248-b01)
    • All Android licenses accepted.

[!] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    ✗ Verify that all connected devices have been paired with this computer in Xcode.
      If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
      To update with Brew, run:
        brew update
        brew uninstall --ignore-dependencies libimobiledevice
        brew uninstall --ignore-dependencies usbmuxd
        brew install --HEAD usbmuxd
        brew unlink usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 31.3.3
    • Dart plugin version 182.5124
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] IntelliJ IDEA Community Edition (version 2018.3.4)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 32.0.3
    • Dart plugin version 183.5429.25

[✓] VS Code (version 1.30.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.22.2

[✓] Connected device (1 available)
    • iPhone SE • 58F34A3E-1576-453E-B1B4-3DCB22E1FEDD • ios • iOS 12.1 (simulator)
</code></pre></div>
<p dir="auto">Might be related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="405069628" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/27333" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/27333/hovercard" href="https://github.com/flutter/flutter/issues/27333">#27333</a> but error message and reproduction steps are difference.</p>