Flutter's Default Activity Now Hosts Jetpack Compose: ViewTree Owners Land for Lifecycle, SavedState, and ViewModel
ComposeView now works inside Flutter's AndroidView without manual owner plumbing, and the Virtual Display fix covers split-screen and multi-window paths. Reusing a cached FlutterEngine won't leave ComposeUI bound to a destroyed Activity.
Flutter's newest PR (#195523) adds Jetpack ComposeView support to the default FlutterActivity. The change makes FlutterActivity implement SavedStateRegistryOwner and ViewModelStoreOwner, and publishes a LifecycleOwner onto the DecorView. That lets a ComposeView created inside an AndroidView walk up the view tree and find the AndroidX hosts it needs for lifecycle, state restoration, and ViewModel scoping.
Previously this only worked when you used FlutterFragmentActivity or manually injected owners, because the plain FlutterActivity never wired those interfaces into the view hierarchy. The PR also handles Virtual Display: ComposeView inside a SingleViewPresentation lives in a separate window with no common parent to the Activity's DecorView, so a new ViewTreeOwners helper reads the owners from the current FlutterView and installs them on the Presentation's root view. Owner references are re-fetched on recreation to avoid stale lifecycle from a reused FlutterEngine.
The Virtual Display complication is the real blocker, not the primary Activity patch.
Re-fetching owners on recreation directly addresses FlutterEngine reuse, showing the team anticipates detach and reattach flows.
This is plumbing work that makes ComposeView a first-class citizen in Flutter's existing AndroidView mechanism without new API surface.