Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pointer_interceptor] Add performance warning on using pointer interceptor on iOS #7288

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT

* Adds performance warning about using multiple pointer interceptors on iOS.
* Updates minimum supported SDK version to Flutter 3.16/Dart 3.2.

## 0.10.1+1
Expand Down
2 changes: 2 additions & 0 deletions packages/pointer_interceptor/pointer_interceptor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

`PointerInterceptor` is a widget that prevents mouse events from being captured by an underlying [`HtmlElementView`](https://api.flutter.dev/flutter/widgets/HtmlElementView-class.html) in web, or an underlying [`PlatformView`](https://api.flutter.dev/flutter/widgets/PlatformViewLink-class.html) on iOS.

Using multiple `PointerInterceptor` on iOS can be slow with increased memory usage, due to performance overhead of the underlying platform view.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tiny microscopic nit:
"Using multiple PointerInterceptor instances* on iOS can be slow and increases memory usage due to the performance overhead of the underlying platform view."


## What is the problem?

When overlaying Flutter widgets on top of `HtmlElementView`/`PlatformView` widgets that respond to mouse gestures (handle clicks, for example), the clicks will be consumed by the `HtmlElementView`/`PlatformView`, and not relayed to Flutter.
Expand Down