一、CustomScrollView 的作用

创建一个公共的 Scrollable 和 Viewport ,然后它的 slivers 参数接受一个 Sliver 数组

 

二、常用 Sliver 组件对照表

Sliver名称 功能 对应的可滚动组件
SliverList 列表 ListView
SliverFixedExtentList 高度固定的列表 ListView,指定itemExtent
SliverAnimatedList 添加/删除列表项可以执行动画 AnimatedList
SliverGrid 网格 GridView
SliverPrototypeExtentList 根据原型生成高度固定的列表 ListView,指定prototypeItem 时
SliverFillViewport 包含多给子组件,每个都可以填满屏幕 PageView

 

 

233

相关文章:

  • 2021-10-18
  • 2021-04-27
  • 2022-12-23
  • 2021-04-07
  • 2021-08-21
  • 2021-06-20
  • 2021-06-29
  • 2022-02-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-19
  • 2021-05-28
  • 2023-03-07
  • 2022-02-24
相关资源
相似解决方案