ScrollList constructor

const ScrollList({
  1. Key? key,
  2. bool reverse = false,
  3. bool shrinkWrap = false,
  4. bool noScrollBehavior = false,
  5. bool? primary,
  6. Axis scrollDirection = Axis.vertical,
  7. Clip clipBehavior = Clip.hardEdge,
  8. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  9. String? restorationId,
  10. double? cacheExtent,
  11. ScrollPhysics? physics,
  12. EdgeInsetsGeometry? padding,
  13. RefreshConfig? refreshConfig,
  14. ScrollController? controller,
  15. required List<Widget> sliver,
  16. Widget? header,
  17. Widget? footer,
})

滑动类型设置 physics AlwaysScrollableScrollPhysics() 总是可以滑动 NeverScrollableScrollPhysics() 禁止滚动 BouncingScrollPhysics() 内容超过一屏 有回弹效果 ClampingScrollPhysics() 包裹内容 不会有回弹

Implementation

const ScrollList({
  super.key,
  super.reverse = false,
  super.shrinkWrap = false,
  super.noScrollBehavior = false,
  super.primary,
  super.scrollDirection = Axis.vertical,
  super.clipBehavior = Clip.hardEdge,
  super.dragStartBehavior = DragStartBehavior.start,
  super.restorationId,
  super.cacheExtent,
  super.physics,
  super.padding,
  super.refreshConfig,
  super.controller,
  required this.sliver,
  this.header,
  this.footer,
});