Skip to content

Commit

Permalink
[pointer_interceptor] Add performance warning on using pointer interc…
Browse files Browse the repository at this point in the history
…eptor on iOS (#7288)

Add performance warning to package README on using pointer interceptor on iOS.

## Issues

Fixes flutter/flutter#151535
  • Loading branch information
hellohuanlin authored Aug 5, 2024
1 parent 064cdb4 commit c451af7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 0.10.1+2

* 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` 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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: pointer_interceptor
description: A widget to prevent clicks from being swallowed by underlying HtmlElementViews on the web.
repository: https://github.com/flutter/packages/tree/main/packages/pointer_interceptor/pointer_interceptor
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+pointer_interceptor%22
version: 0.10.1+1
version: 0.10.1+2

environment:
sdk: ^3.2.0
Expand Down

0 comments on commit c451af7

Please sign in to comment.