Jenn Magder d30a412e28 Support accessibility back gesture to pop route from view controller (flutter/engine#51241)
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
2024-03-18 18:11:59 +00:00
..