[Android] Make PVC1 and PVC2 share a platform view registry. (#162857)

This avoids the insanity of having to register everything twice. Since
the object is shared a registration on pvc1 will automatically apply to
pvc2.
This commit is contained in:
Jonah Williams
2025-02-07 17:05:00 -08:00
committed by GitHub
parent 6cca066620
commit 53bcdf2cda
5 changed files with 29 additions and 13 deletions

View File

@@ -32,17 +32,6 @@ class MainActivity : FlutterActivity() {
add(NativeDriverSupportPlugin())
}
// TODO(jonahwilliams): make platform view controllers share platform view registry.
flutterEngine
.platformViewsController2
.registry
.apply {
registerViewFactory("blue_orange_gradient_platform_view", BlueOrangeGradientPlatformViewFactory())
registerViewFactory("blue_orange_gradient_surface_view_platform_view", BlueOrangeGradientSurfaceViewPlatformViewFactory())
registerViewFactory("changing_color_button_platform_view", ChangingColorButtonPlatformViewFactory())
registerViewFactory("box_platform_view", BoxPlatformViewFactory())
}
flutterEngine
.platformViewsController
.registry