Repository: flutter
Issue: [NavigationRail] App throws `_debugDuringDeviceUpdate ` when quickly switching between NavigationRail Items, app freezes after several tries
Labels: framework,f: material design,a: desktop,a: mouse,has reproducible steps,P2,found in release: 2.2,found in release: 2.3,team-design,triaged-design

My macOS app, and Chrome app, keep crashing after some arbitrary amount of time.  The iOS app does not.

I've tracked it down (after much guess work) to a very simple use of NavigationRail, coupled with some fast clicking.

[This app]() has a rail with two elements.  If I move my mouse between the two elements, clicking as I go, and sometimes move my mouse outside the window and back again, then about 40 clicks later, everything freezes
completely.  All mouse movements and clicks cause further exceptions.

I always get a **'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos 12: '!_debugDuringDeviceUpdate': is not true.** exception.

While the below shows the error in the current beta channel, it also happens on stable channel with **Dart 2.13.3 & Flutter 2.2.2**.

In my app, i don't have to click around very fast to do this.  It just happens after some arbitrary amount of time while clicking quite normally.

## Steps to Reproduce

1. Check out https://github.com/jonmountjoy/bugmoose
2. `flutter run -d macos --verbose`
3. Click quickly, between the two options, moving mouse between them, and sometimes moving mouse outside the target areas of each button.  

<details>
  <summary>Logs</summary>

```
[ +541 ms] The Flutter DevTools debugger and profiler on macOS is available at:
                    http://127.0.0.1:9102?uri=http%3A%2F%2F127.0.0.1%3A52068%2FIOSmvO2LbLk%3D%2F
[+19505 ms] flutter: MyScaffold: Build
[ +615 ms] flutter: MyScaffold: Build
[ +383 ms] flutter: MyScaffold: Build
[ +416 ms] flutter: MyScaffold: Build
[ +466 ms] flutter: MyScaffold: Build
[ +834 ms] flutter: MyScaffold: Build
[ +500 ms] flutter: MyScaffold: Build
[ +388 ms] flutter: MyScaffold: Build
[ +944 ms] flutter: MyScaffold: Build
[ +266 ms] flutter: MyScaffold: Build
[ +401 ms] flutter: MyScaffold: Build
[ +315 ms] flutter: MyScaffold: Build
[ +452 ms] flutter: MyScaffold: Build
[ +613 ms] flutter: MyScaffold: Build
[+1268 ms] flutter: MyScaffold: Build
[  +77 ms]
           Another exception was thrown: 'package:flutter/src/painting/text_painter.dart': Failed assertion: line 899 pos 12:
           '!_needsLayout': is not true.
[  +12 ms]
           Another exception was thrown: 'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos
12:
           '!_debugDuringDeviceUpdate': is not true.
[  +21 ms]
           Another exception was thrown: 'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos
12:
           '!_debugDuringDeviceUpdate': is not true.
[  +12 ms]
           Another exception was thrown: 'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos
12:
           '!_debugDuringDeviceUpdate': is not true.
[  +15 ms] [ERROR:flutter/lib/ui/ui_dart_state.cc(213)] Unhandled Exception:
'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos 12: '!_debugDuringDeviceUpdate': is not
true.
[   +1 ms] #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
[        ] #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
[        ] #2      MouseTracker._deviceUpdatePhase (package:flutter/src/rendering/mouse_tracker.dart:201:12)
[        ] #3      MouseTracker.updateWithEvent.<anonymous closure> (package:flutter/src/rendering/mouse_tracker.dart:309:7)
[        ] #4      MouseTracker._monitorMouseConnection (package:flutter/src/rendering/mouse_tracker.dart:190:9)
[        ] #5      MouseTracker.updateWithEvent (package:flutter/src/rendering/mouse_tracker.dart:308:5)
[        ] #6      RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:285:22)
[        ] #7      GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:374:7)
[   +2 ms] #8      GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:338:5)
[        ] #9      GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:296:7)
[        ] #10     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:279:7)
[        ] #11     _rootRunUnary (dart:async/zone.dart:1444:13)
[        ] #12     _CustomZone.runUnary (dart:async/zone.dart:1335:19)
[        ] #13     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
[        ] #14     _invoke1 (dart:ui/hooks.dart:182:10)
[        ] #15     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
[        ] #16     _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
[   +5 ms] [ERROR:flutter/lib/ui/ui_dart_state.cc(213)] Unhandled Exception:
'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos 12: '!_debugDuringDeviceUpdate': is not
true.
[        ] #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
[        ] #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
[        ] #2      MouseTracker._deviceUpdatePhase (package:flutter/src/rendering/mouse_tracker.dart:201:12)
[        ] #3      MouseTracker.updateWithEvent.<anonymous closure> (package:flutter/src/rendering/mouse_tracker.dart:309:7)
[        ] #4      MouseTracker._monitorMouseConnection (package:flutter/src/rendering/mouse_tracker.dart:190:9)
[        ] #5      MouseTracker.updateWithEvent (package:flutter/src/rendering/mouse_tracker.dart:308:5)
[        ] #6      RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:285:22)
[        ] #7      GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:374:7)
[        ] #8      GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:338:5)
[        ] #9      GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:296:7)
[        ] #10     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:279:7)
[        ] #11     _rootRunUnary (dart:async/zone.dart:1444:13)
[        ] #12     _CustomZone.runUnary (dart:async/zone.dart:1335:19)
[        ] #13     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
[        ] #14     _invoke1 (dart:ui/hooks.dart:182:10)
[        ] #15     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
[        ] #16     _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
[        ]
           Another exception was thrown: 'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos
12:
           '!_debugDuringDeviceUpdate': is not true.
[        ] [ERROR:flutter/lib/ui/ui_dart_state.cc(213)] Unhandled Exception:
'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos 12: '!_debugDuringDeviceUpdate': is not
true.
[        ] #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
[        ] #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
[        ] #2      MouseTracker._deviceUpdatePhase (package:flutter/src/rendering/mouse_tracker.dart:201:12)
[        ] #3      MouseTracker.updateWithEvent.<anonymous closure> (package:flutter/src/rendering/mouse_tracker.dart:309:7)
[        ] #4      MouseTracker._monitorMouseConnection (package:flutter/src/rendering/mouse_tracker.dart:190:9)
[        ] #5      MouseTracker.updateWithEvent (package:flutter/src/rendering/mouse_tracker.dart:308:5)
[        ] #6      RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:285:22)
[        ] #7      GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:374:7)
[        ] #8      GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:338:5)
[        ] #9      GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:296:7)
[        ] #10     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:279:7)
[        ] #11     _rootRunUnary (dart:async/zone.dart:1444:13)
[        ] #12     _CustomZone.runUnary (dart:async/zone.dart:1335:19)
[        ] #13     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
[        ] #14     _invoke1 (dart:ui/hooks.dart:182:10)
[        ] #15     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
[        ] #16     _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
[        ] [ERROR:flutter/lib/ui/ui_dart_state.cc(213)] Unhandled Exception:
'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos 12: '!_debugDuringDeviceUpdate': is not
true.
[   +1 ms] #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
[        ] #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
[        ] #2      MouseTracker._deviceUpdatePhase (package:flutter/src/rendering/mouse_tracker.dart:201:12)
[        ] #3      MouseTracker.updateWithEvent.<anonymous closure> (package:flutter/src/rendering/mouse_tracker.dart:309:7)
[        ] #4      MouseTracker._monitorMouseConnection (package:flutter/src/rendering/mouse_tracker.dart:190:9)
[        ] #5      MouseTracker.updateWithEvent (package:flutter/src/rendering/mouse_tracker.dart:308:5)
[        ] #6      RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:285:22)
[        ] #7      GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:374:7)
[        ] #8      GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:338:5)
[        ] #9      GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:296:7)
[        ] #10     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:279:7)
[        ] #11     _rootRunUnary (dart:async/zone.dart:1444:13)
[        ] #12     _CustomZone.runUnary (dart:async/zone.dart:1335:19)
[        ] #13     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
[        ] #14     _invoke1 (dart:ui/hooks.dart:182:10)
[        ] #15     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
[        ] #16     _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
[   +2 ms] [ERROR:flutter/lib/ui/ui_dart_state.cc(213)] Unhandled Exception:
'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos 12: '!_debugDuringDeviceUpdate': is not
true.
[        ] #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
[        ] #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
[        ] #2      MouseTracker._deviceUpdatePhase (package:flutter/src/rendering/mouse_tracker.dart:201:12)
[        ] #3      MouseTracker.updateWithEvent.<anonymous closure> (package:flutter/src/rendering/mouse_tracker.dart:309:7)
[        ] #4      MouseTracker._monitorMouseConnection (package:flutter/src/rendering/mouse_tracker.dart:190:9)
[        ] #5      MouseTracker.updateWithEvent (package:flutter/src/rendering/mouse_tracker.dart:308:5)
[        ] #6      RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:285:22)
[        ] #7      GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:374:7)
[        ] #8      GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:338:5)
[        ] #9      GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:296:7)
[        ] #10     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:279:7)
[        ] #11     _rootRunUnary (dart:async/zone.dart:1444:13)
[        ] #12     _CustomZone.runUnary (dart:async/zone.dart:1335:19)
[        ] #13     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
[        ] #14     _invoke1 (dart:ui/hooks.dart:182:10)
[        ] #15     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
[        ] #16     _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
[   +8 ms] [ERROR:flutter/lib/ui/ui_dart_state.cc(213)] Unhandled Exception:
'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos 12: '!_debugDuringDeviceUpdate': is not
true.
[        ] #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
[   +1 ms] #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
[        ] #2      MouseTracker._deviceUpdatePhase (package:flutter/src/rendering/mouse_tracker.dart:201:12)
[        ] #3      MouseTracker.updateWithEvent.<anonymous closure> (package:flutter/src/rendering/mouse_tracker.dart:309:7)
[   +1 ms] #4      MouseTracker._monitorMouseConnection (package:flutter/src/rendering/mouse_tracker.dart:190:9)
[        ] #5      MouseTracker.updateWithEvent (package:flutter/src/rendering/mouse_tracker.dart:308:5)
[        ] #6      RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:285:22)
[        ] #7      GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:374:7)
[        ] #8      GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:338:5)
[        ] #9      GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:296:7)
[        ] #10     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:279:7)
[        ] #11     _rootRunUnary (dart:async/zone.dart:1444:13)
[        ] #12     _CustomZone.runUnary (dart:async/zone.dart:1335:19)
[        ] #13     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
[        ] #14     _invoke1 (dart:ui/hooks.dart:182:10)
[        ] #15     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
[        ] #16     _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
[   +1 ms]
           Another exception was thrown: 'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos
12:
           '!_debugDuringDeviceUpdate': is not true.
[        ] [ERROR:flutter/lib/ui/ui_dart_state.cc(213)] Unhandled Exception:
'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos 12: '!_debugDuringDeviceUpdate': is not
true.
[        ] #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
[        ] #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
[        ] #2      MouseTracker._deviceUpdatePhase (package:flutter/src/rendering/mouse_tracker.dart:201:12)
[        ] #3      MouseTracker.updateWithEvent.<anonymous closure> (package:flutter/src/rendering/mouse_tracker.dart:309:7)
[        ] #4      MouseTracker._monitorMouseConnection (package:flutter/src/rendering/mouse_tracker.dart:190:9)
[        ] #5      MouseTracker.updateWithEvent (package:flutter/src/rendering/mouse_tracker.dart:308:5)
[        ] #6      RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:285:22)
[        ] #7      GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:374:7)
[        ] #8      GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:338:5)
[        ] #9      GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:296:7)
[        ] #10     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:279:7)
[        ] #11     _rootRunUnary (dart:async/zone.dart:1444:13)
[        ] #12     _CustomZone.runUnary (dart:async/zone.dart:1335:19)
[        ] #13     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
[        ] #14     _invoke1 (dart:ui/hooks.dart:182:10)
[        ] #15     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
[        ] #16     _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
[  +18 ms]
           Another exception was thrown: 'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos
12:
           '!_debugDuringDeviceUpdate': is not true.
[   +3 ms] [ERROR:flutter/lib/ui/ui_dart_state.cc(213)] Unhandled Exception:
'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos 12: '!_debugDuringDeviceUpdate': is not
true.
[        ] #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
[        ] #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
[        ] #2      MouseTracker._deviceUpdatePhase (package:flutter/src/rendering/mouse_tracker.dart:201:12)
[        ] #3      MouseTracker.updateWithEvent.<anonymous closure> (package:flutter/src/rendering/mouse_tracker.dart:309:7)
[        ] #4      MouseTracker._monitorMouseConnection (package:flutter/src/rendering/mouse_tracker.dart:190:9)
[        ] #5      MouseTracker.updateWithEvent (package:flutter/src/rendering/mouse_tracker.dart:308:5)
[        ] #6      RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:285:22)
[        ] #7      GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:374:7)
[        ] #8      GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:338:5)
[        ] #9      GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:296:7)
[        ] #10     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:279:7)
[        ] #11     _rootRunUnary (dart:async/zone.dart:1444:13)
[        ] #12     _CustomZone.runUnary (dart:async/zone.dart:1335:19)
[        ] #13     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
[        ] #14     _invoke1 (dart:ui/hooks.dart:182:10)
[        ] #15     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
[        ] #16     _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
[        ] [ERROR:flutter/lib/ui/ui_dart_state.cc(213)] Unhandled Exception:
'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos 12: '!_debugDuringDeviceUpdate': is not
true.
[   +3 ms] #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
[        ] #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
[        ] #2      MouseTracker._deviceUpdatePhase (package:flutter/src/rendering/mouse_tracker.dart:201:12)
[        ] #3      MouseTracker.updateWithEvent.<anonymous closure> (package:flutter/src/rendering/mouse_tracker.dart:309:7)
[        ] #4      MouseTracker._monitorMouseConnection (package:flutter/src/rendering/mouse_tracker.dart:190:9)
[        ] #5      MouseTracker.updateWithEvent (package:flutter/src/rendering/mouse_tracker.dart:308:5)
[        ] #6      RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:285:22)
[        ] #7      GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:374:7)
[        ] #8      GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:338:5)
[        ] #9      GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:296:7)
[        ] #10     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:279:7)
[        ] #11     _rootRunUnary (dart:async/zone.dart:1444:13)
[        ] #12     _CustomZone.runUnary (dart:async/zone.dart:1335:19)
[        ] #13     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
[        ] #14     _invoke1 (dart:ui/hooks.dart:182:10)
[        ] #15     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
[        ] #16     _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
[        ] [ERROR:flutter/lib/ui/ui_dart_state.cc(213)] Unhandled Exception:
'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos 12: '!_debugDuringDeviceUpdate': is not
true.
[   +1 ms] #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
[        ] #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
[        ] #2      MouseTracker._deviceUpdatePhase (package:flutter/src/rendering/mouse_tracker.dart:201:12)
[        ] #3      MouseTracker.updateWithEvent.<anonymous closure> (package:flutter/src/rendering/mouse_tracker.dart:309:7)
[        ] #4      MouseTracker._monitorMouseConnection (package:flutter/src/rendering/mouse_tracker.dart:190:9)
[        ] #5      MouseTracker.updateWithEvent (package:flutter/src/rendering/mouse_tracker.dart:308:5)
[        ] #6      RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:285:22)
[        ] #7      GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:374:7)
[        ] #8      GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:338:5)
[        ] #9      GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:296:7)
[        ] #10     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:279:7)
[        ] #11     _rootRunUnary (dart:async/zone.dart:1444:13)
[        ] #12     _CustomZone.runUnary (dart:async/zone.dart:1335:19)
[        ] #13     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
[        ] #14     _invoke1 (dart:ui/hooks.dart:182:10)
[        ] #15     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
[        ] #16     _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
[        ] [ERROR:flutter/lib/ui/ui_dart_state.cc(213)] Unhandled Exception:
'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos 12: '!_debugDuringDeviceUpdate': is not
true.
[        ] #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
[        ] #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
[        ] #2      MouseTracker._deviceUpdatePhase (package:flutter/src/rendering/mouse_tracker.dart:201:12)
[        ] #3      MouseTracker.updateWithEvent.<anonymous closure> (package:flutter/src/rendering/mouse_tracker.dart:309:7)
[        ] #4      MouseTracker._monitorMouseConnection (package:flutter/src/rendering/mouse_tracker.dart:190:9)
[        ] #5      MouseTracker.updateWithEvent (package:flutter/src/rendering/mouse_tracker.dart:308:5)
[        ] #6      RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:285:22)
[        ] #7      GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:374:7)
[        ] #8      GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:338:5)
[        ] #9      GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:296:7)
[        ] #10     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:279:7)
[        ] #11     _rootRunUnary (dart:async/zone.dart:1444:13)
[        ] #12     _CustomZone.runUnary (dart:async/zone.dart:1335:19)
[        ] #13     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
[        ] #14     _invoke1 (dart:ui/hooks.dart:182:10)
[        ] #15     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
[        ] #16     _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
[        ] [ERROR:flutter/lib/ui/ui_dart_state.cc(213)] Unhandled Exception:
'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 201 pos 12: '!_debugDuringDeviceUpdate': is not
true.


The same error repeats hundreds of times

```
```

Analyzing bugmoose...

   info • Name source files using `lowercase_with_underscores` • lib/MyScaffold.dart:1:1 • file_names
   info • Prefer declaring const constructors on `@immutable` classes • lib/MyScaffold.dart:11:3 •
          prefer_const_constructors_in_immutables
   info • The value of the field 'iconLearn' isn't used • lib/MyScaffold.dart:19:16 • unused_field
   info • Prefer const with constant constructors • lib/MyScaffold.dart:19:28 • prefer_const_constructors
   info • Prefer const with constant constructors • lib/MyScaffold.dart:28:14 • prefer_const_constructors
   info • Prefer const with constant constructors • lib/MyScaffold.dart:29:31 • prefer_const_constructors
   info • Avoid `print` calls in production code • lib/MyScaffold.dart:51:5 • avoid_print
   info • Avoid unnecessary containers • lib/MyScaffold.dart:58:17 • avoid_unnecessary_containers
   info • Prefer const with constant constructors • lib/MyScaffold.dart:76:31 • prefer_const_constructors
   info • Prefer const with constant constructors • lib/MyScaffold.dart:78:31 • prefer_const_constructors
   info • Prefer const with constant constructors • lib/MyScaffold.dart:79:32 • prefer_const_constructors
   info • Prefer const with constant constructors • lib/MyScaffold.dart:81:26 • prefer_const_constructors
   info • Prefer declaring const constructors on `@immutable` classes • lib/MyScaffold.dart:129:3 •
          prefer_const_constructors_in_immutables
   info • Avoid unnecessary containers • lib/MyScaffold.dart:138:12 • avoid_unnecessary_containers

```
```

The bug happens on Flutter 2.2.2.  It also happens on 2.3.0 beta, as you can see below.

bugmoose(master) ✗: flutter doctor -v
[✓] Flutter (Channel beta, 2.3.0-24.1.pre, on macOS 11.3 20E232 darwin-x64, locale en-GB)
    • Flutter version 2.3.0-24.1.pre at /Users/jonmountjoy/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 615957513e (27 hours ago), 2021-06-25 09:24:44 -0700
    • Engine revision 9d517f475b
    • Dart version 2.14.0 (build 2.14.0-188.5.beta)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5.1, Build version 12E507
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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-b3-6915495)

[✓] VS Code (version 1.57.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.23.0

[✓] Connected device (3 available)
```

</details>