简体   繁体   English

NestedScrollView和CustomScrollView有什么区别?

[英]What is the difference between NestedScrollView and CustomScrollView?

我很难理解NestedScrollView和CustomScrollView之间的区别?

CustomScrollView - is the most customizable way to build any "scroll" based layouts using Sliver objects. CustomScrollView - 是使用Sliver对象构建任何“基于滚动”的布局的最可自定义的方法。 SingleChildScrollView and NestedScrollView are both build on top of it. SingleChildScrollViewNestedScrollView都是在它之上构建的。

NestedScrollView - is a Wiget provided for a very particular use-case - to put One Scrollable object inside another (in most case - where the directions are not same). NestedScrollView - 是一个为特定用例提供的Wiget - 将One Scrollable对象放入另一个(大多数情况下 - 方向不相同)。

This is what is mentioned in the doc for NestedScrollView 这是NestedScrollView的文档中NestedScrollView

A scrolling view inside of which can be nested other scrolling views, with their scroll positions being intrinsically linked. 其中的滚动视图可以嵌套其他滚动视图,其滚动位置本质上是链接的。

The beauty of flutter is that it is open source, you can check the source code to know what is going on under the hood. 颤抖的美妙之处在于它是开源的,您可以查看源代码以了解引擎盖下发生了什么。

Souce Code: Souce代码:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM