搜索插件、代码仓与 APP 分类

pointer_interceptor 封面
插件详情v0.10.1+3

pointer_interceptor

一个用于防止点击事件被网页上的底层 HtmlElementView 吞噬的部件。

iOSWeb
近 30 天下载
2230
喜欢数
279
Pub 分数
160

安装插件

flutter pub add pointer_interceptor

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

pointer_interceptor 包提供了一个 widget,确保指针事件(如点击)不会被 Web 上的底层 HtmlElementViews 吸收。它允许 Flutter widget 在覆盖 Web 特定组件(如 iframes 或嵌入的 HTML 内容)时仍能接收输入事件。这对于在混合 Web 应用中保持交互功能非常有用,因为原生 HTML 元素可能会拦截手势。该包专为与 Flutter 的 Web 平台无缝集成而设计,并支持 iOS 和 Web 平台。

适合场景

  • 处理 iframe 上的触摸事件
  • 确保按钮交互在嵌入的网页内容上正常工作
  • 防止基于 Web 的混合应用程序中的手势丢失
  • 改进网页叠加层的可用性
  • 在 HTML 视图上方启用可点击的 UI 元素

主要特点

  • 防止 HtmlElementViews 导致事件被吞没
  • 用于事件拦截的简单小部件包装器
  • 跨平台支持 Web 和 iOS
  • 最小配置要求
  • 保持 Flutter 手势系统的完整性

适合对象

  • 使用嵌入式 HTML 开发 Web 应用的开发人员
  • 在Flutter Web项目中使用iframe的团队
  • 网页上需要精确指针控制的应用程序
  • 具有分层交互组件的 UI
  • 在网页上需要可靠手势处理的项目

使用建议

  • 仅限网页和iOS平台
  • 可能需要仔细叠加小部件
  • 在非HTML叠加场景中不需要
  • 性能影响微乎其微但确实存在
  • 在与外部网页内容交互时最佳使用

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Flutter Packages

Release Status Flutter CI Status

This repo is a companion repo to the main flutter repo. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team). Check the packages directory to see all packages.

These packages are also available on pub.

Issues

Please file any issues, bugs, or feature requests in the main flutter repo. Issues pertaining to this repository are labeled "package".

Contributing

If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.

If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide, and send a pull request.

Packages

These are the packages hosted in this repository:

Package Pub Points Usage Issues Pull requests
animations pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
camera pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
cross_file pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
cupertino_icons pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
cupertino_ui pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
espresso pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
extension_google_sign_in_as_googleapis_auth pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
file_selector pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
flutter_lints pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
flutter_plugin_android_lifecycle pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
flutter_svg pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
flutter_svg_test pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
go_router pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
go_router_builder pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
google_adsense pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
google_fonts pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
google_maps_flutter pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
google_sign_in pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
image_picker pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
interactive_media_ads pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
in_app_purchase pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
local_auth pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
material_ui pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
metrics_center pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
path_parsing pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
path_provider pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
pigeon pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
pointer_interceptor pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
plugin_platform_interface pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
quick_actions pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
google_identity_services_web pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
rfw pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
shared_preferences pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
two_dimensional_scrollables pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
url_launcher pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
vector_graphics pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
vector_graphics_codec pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
vector_graphics_compiler pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
video_player pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
web_benchmarks pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
webview_flutter pub package pub points downloads GitHub issues by-label GitHub pull requests by-label
xdg_directories pub package pub points downloads GitHub issues by-label GitHub pull requests by-label

所属分类

依赖

依赖清单 3 项

  • pointer_interceptor_ios^0.10.0
  • pointer_interceptor_platform_interface^0.10.0
  • pointer_interceptor_web^0.10.0

源码仓库

使用此插件的项目