juicycleff / flutter-unity-view-widget

Embeddable unity game engine view for Flutter. Advance demo here https://github.com/juicycleff/flutter-unity-arkit-demo
BSD 3-Clause "New" or "Revised" License
2.13k stars 518 forks source link

[Web] Fix PointerInterceptor in examples blocking all clicks. #834

Closed timbotimbo closed 1 year ago

timbotimbo commented 1 year ago

Description

Web needs a PointerInterceptor to be able to click on any widget on top of the UnityWidget. However in the way this is used in the examples, all clicks are intercepted and none will ever reach Unity #827.

This is because it is wrapped around a Positioned, and will take the full dimensions of the Stack.

This pull request simply moves the PointerInterceptor down in the hierarchy, so that it shrinks in size to fit the widget that needs mouse input

Type of Change