mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Adapted suggestion from https://github.com/flutter/flutter/issues/74246#issuecomment-971326926 to pop the route if the view controller route if `accessibilityPerformEscape` is called at that level in the responder chain.
Ideally this could know if the route was successfully popped, and only then return `YES` (halting propagation through the responder chain).
I confirmed by editing https://docs.flutter.dev/cookbook/navigation/navigation-basics#interactive-example as a demo that that the two-finger scrub (move two fingers back and forth three times quickly, making a "z") navigates back to the last route, and that the [`SementicObject`](e889b287f1/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm (L763)) scrub, which already worked, continued to work.
I'm not super familiar with this code, hopefully there aren't further gotchas I'm not thinking of.
Fixes https://github.com/flutter/flutter/issues/74246
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style