diff --git a/packages/flutter/lib/src/services/platform_views.dart b/packages/flutter/lib/src/services/platform_views.dart index 276f0905e08..b6ae2328ea8 100644 --- a/packages/flutter/lib/src/services/platform_views.dart +++ b/packages/flutter/lib/src/services/platform_views.dart @@ -888,12 +888,6 @@ abstract class AndroidViewController extends PlatformViewController { /// call's future has completed. bool get requiresViewComposition => false; - /// True if the experimental hybrid composition controller is enabled. - /// - /// This value may change during [create], but will not change after that - /// call's future has completed. - bool get useNewHybridComposition => false; - /// Sends an Android [MotionEvent](https://developer.android.com/reference/android/view/MotionEvent) /// to the view. /// @@ -1179,9 +1173,6 @@ class HybridAndroidViewController extends AndroidViewController { ); } - @override - bool get useNewHybridComposition => true; - @override int? get textureId { return _internals.textureId; @@ -1206,6 +1197,11 @@ class HybridAndroidViewController extends AndroidViewController { Future setOffset(Offset off) { return _internals.setOffset(off, viewId: viewId, viewState: _state); } + + @override + Future sendMotionEvent(AndroidMotionEvent event) async { + await SystemChannels.platform_views.invokeMethod('touch', event._asList(viewId)); + } } /// Controls an Android view that is rendered as a texture. diff --git a/packages/flutter/lib/src/widgets/platform_view.dart b/packages/flutter/lib/src/widgets/platform_view.dart index 72c6d66b0e5..441a989fa70 100644 --- a/packages/flutter/lib/src/widgets/platform_view.dart +++ b/packages/flutter/lib/src/widgets/platform_view.dart @@ -1473,14 +1473,6 @@ class _AndroidViewSurfaceState extends State { @override Widget build(BuildContext context) { if (widget.controller.requiresViewComposition) { - if (widget.controller.useNewHybridComposition) { - // TODO(jonahwilliams): make it actually work. - return _PlatformLayerBasedAndroidViewSurface( - controller: widget.controller, - hitTestBehavior: widget.hitTestBehavior, - gestureRecognizers: widget.gestureRecognizers, - ); - } return _PlatformLayerBasedAndroidViewSurface( controller: widget.controller, hitTestBehavior: widget.hitTestBehavior, diff --git a/packages/flutter/test/services/fake_platform_views.dart b/packages/flutter/test/services/fake_platform_views.dart index 023c936d1bb..059bb34fb8c 100644 --- a/packages/flutter/test/services/fake_platform_views.dart +++ b/packages/flutter/test/services/fake_platform_views.dart @@ -49,7 +49,6 @@ class FakeAndroidViewController implements AndroidViewController { this.viewId, { this.requiresSize = false, this.requiresViewComposition = false, - this.useNewHybridComposition = false, }); bool disposed = false; @@ -148,9 +147,6 @@ class FakeAndroidViewController implements AndroidViewController { @override bool requiresViewComposition; - - @override - bool useNewHybridComposition; } class FakeAndroidPlatformViewsController {