forked from firka/flutter
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user