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

nested_scroll_views 封面
插件详情v0.0.12

nested_scroll_views

Flutter 嵌套滚动视图。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
965
喜欢数
53
Pub 分数
140

安装插件

flutter pub add nested_scroll_views

插件介绍

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

一个增强嵌套滚动功能的Flutter包,可实现滚动控件之间的流畅且响应迅速的交互。它提供了对嵌套滚动视图的改进处理,确保父级和子级滚动控件之间的滚动物理效果和协调性。适用于需要分层滚动行为的复杂UI布局,例如可折叠标题或集成的滚动区域。该包兼容所有主要平台,并可无缝集成到现有的Flutter项目中。

适合场景

  • 具有分层可滚动内容的复杂UI
  • 可折叠标题带有嵌套滚动效果
  • 在单个视图中集成可滚动的部分
  • 滚动可滚动容器内的内容
  • 多平台上的响应式布局

主要特点

  • 改进的嵌套滚动协调
  • 跨平台兼容性
  • 与 Flutter 的 ScrollController 无缝集成
  • 对自定义滚动物理效果的支持
  • 嵌套滚动的优化性能

适合对象

  • 开发高级可滚动界面的开发者
  • 具有动态标题栏行为的应用程序
  • 多层滚动布局
  • 针对 Android、iOS、Web、macOS、Windows 和 Linux 的项目
  • 寻求可靠嵌套滚动解决方案的团队

使用建议

  • 可能需要仔细配置以处理复杂的嵌套
  • 深度嵌套结构带来的性能影响
  • 在简单情况下,不是内置滚动视图的替代品
  • 在标准嵌套滚动无法满足需求时使用最佳
  • 需要了解 Flutter 的滚动系统

原始 README

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

Nested Scrolling Views

Flutter nested scrolling views.

NestedTabBarView.gif NestedPageView.gif NestedSingleChildScrollView.gif

Usage

Replace flutter's views with the following views and use them nested.

Flutter Nested
PageView NestedPageView
TabBarView NestedTabBarView
ListView NestedListView
GridView NestedGridView
CustomScrollView NestedCustomScrollView
SingleChildScrollView NestedSingleChildScrollView

Attention

  1. Nested non-nested views with the same scroll direction will result in weird scrolling.
  2. Nested views are kept alive by default, you can set wantKeepAlive to false, which may lead to loss of gesture events because the page is destroyed.

Thanks

  • flutter:Flutter makes it easy and fast to build beautiful apps for mobile and beyond

  • union_tabs:A nested TabBarView overscroll unites outer TabBarView scroll event

  • primary_page_view:FLutter Nested Primary PageView

所属分类

源码仓库

使用此插件的项目

暂无相关数据。