ScrollList constructor
const
ScrollList({
- Key? key,
- bool reverse = false,
- bool shrinkWrap = false,
- bool noScrollBehavior = false,
- bool? primary,
- Axis scrollDirection = Axis.vertical,
- Clip clipBehavior = Clip.hardEdge,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- String? restorationId,
- double? cacheExtent,
- ScrollPhysics? physics,
- EdgeInsetsGeometry? padding,
- RefreshConfig? refreshConfig,
- ScrollController? controller,
- required List<
Widget> sliver, - Widget? header,
滑动类型设置 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,
});