ScrollList class

Inheritance
Available extensions

Constructors

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, Widget? footer})
滑动类型设置 physics AlwaysScrollableScrollPhysics() 总是可以滑动 NeverScrollableScrollPhysics() 禁止滚动 BouncingScrollPhysics() 内容超过一屏 有回弹效果 ClampingScrollPhysics() 包裹内容 不会有回弹
const
ScrollList.builder({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, ChildIndexGetter? findChildIndexCallback, SemanticIndexCallback semanticIndexCallback = kDefaultSemanticIndexCallback, bool addAutomaticKeepALives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, GridStyle gridStyle = GridStyle.none, required IndexedWidgetBuilder itemBuilder, IndexedWidgetBuilder? separatorBuilder, int? itemCount, double? itemExtent, Widget? prototypeItem, int crossAxisCount = 1, double? maxCrossAxisExtent, double mainAxisSpacing = 0, double crossAxisSpacing = 0, double childAspectRatio = 1, double? mainAxisExtent, Widget placeholder = const PlaceholderChild(), Widget? header, Widget? footer})
ScrollList.count({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, SemanticIndexCallback semanticIndexCallback = kDefaultSemanticIndexCallback, bool addAutomaticKeepALives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, GridStyle gridStyle = GridStyle.none, required List<Widget> children, double? itemExtent, Widget? prototypeItem, int crossAxisCount = 1, double? maxCrossAxisExtent, double mainAxisSpacing = 0, double crossAxisSpacing = 0, double childAspectRatio = 1, double? mainAxisExtent, Widget placeholder = const PlaceholderChild(), Widget? header, Widget? footer})

Properties

anchor double
finalinherited
cacheExtent double?
finalinherited
center Key?
finalinherited
clipBehavior Clip
finalinherited
controller ScrollController?
finalinherited
dragStartBehavior DragStartBehavior
finalinherited
添加底部 Sliver 组件
final
hashCode int
The hash code for this object.
no setterinherited
添加头部 Sliver 组件
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardDismissBehavior ScrollViewKeyboardDismissBehavior
CustomScrollView
finalinherited
noScrollBehavior bool
Extra parameters
finalinherited
padding EdgeInsetsGeometry?
finalinherited
physics ScrollPhysics?
finalinherited
primary bool?
finalinherited
refreshConfig RefreshConfig?
finalinherited
restorationId String?
finalinherited
reverse bool
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollBehavior ScrollBehavior?
finalinherited
scrollDirection Axis
finalinherited
semanticChildCount int?
finalinherited
shrinkWrap bool
finalinherited
sliver List<Widget>
添加多个 Widget
final
slivers List<Widget>
finalinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
inherited
buildCustomScrollView(ScrollPhysics? physics) CustomScrollView
inherited
buildSlivers() List<Widget>
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited