Generally what this PR is doing is setting up a delegation mechanism for Android's onCreateInputConnection. It works by letting the framework know when an embedded view gets loses focus(within the virtual display), the framework maintains a focus node for each Android view that is kept in sync with the focus state of the embedded view. The TextInputPlugin is extended to allow for 2 type of text clients a "framework client"(what we had before) and a "platform view client". When the AndroidView's focus node in the framework is focused the framework sets a "platform view text client" for the TextInputPlugin, which will result in the TextInputPlugin delegating createInputConnection to the platform view. When a platform view is resized, we are detaching it from a virtual display and attaching it to a new one, as a side affect a platform view might lose an active input connection, to workaround that we "lock" the connection when resizing(by caching it and forcing the cached copy until the resize is done). Additional things worth calling out in this PR: To properly answer which views are allowed for input connection proxying we compare a candidate view's root view to the set of root views of all virtual displays. We also preserve a view's focus state across resizes. Note that this PR only wires text for the io.flutter.view.FlutterView For the new Android embedding some additional plumbing is necessary. Corresponding framework PR: flutter/flutter#33901 flutter/flutter#19718
Flutter Engine
Flutter is a new way to build high-performance, cross-platform mobile apps. Flutter is optimized for today's, and tomorrow's, mobile devices. We are focused on low-latency input and high frame rates on Android and iOS.
The Flutter Engine is a portable runtime for hosting Flutter applications. It implements Flutter's core libraries, including animation and graphics, file and network I/O, accessibility support, plugin architecture, and a Dart runtime and compile toolchain. Most developers will interact with Flutter via the Flutter Framework, which provides a modern, reactive framework, and a rich set of platform, layout and foundation widgets.
If you are new to Flutter, then you will find more general information on the Flutter project, including tutorials and samples, on our Web site at Flutter.dev. For specific information about Flutter's APIs, consider our API reference which can be found at the docs.flutter.dev.
If you intend to contribute to Flutter, welcome! You are encouraged to start with our contributor guide, which helps onboard new team members.