ElasticListView class
A ListView preconfigured with ElasticScrollPhysics.
ElasticListView.builder(
itemCount: 40,
itemBuilder: (context, index) => ListTile(title: Text('Item $index')),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ElasticListView
Constructors
-
ElasticListView({Key? key, required List<
Widget> children, double elasticity = 0.3, double stiffness = 100.0, double damping = 0.8, Axis scrollDirection = Axis.vertical, ScrollController? controller, bool shrinkWrap = false, bool reverse = false, EdgeInsetsGeometry? padding, bool enabled = true}) -
Creates an elastic list view from an explicit list of
children.const - ElasticListView.builder({Key? key, required IndexedWidgetBuilder itemBuilder, required int itemCount, double elasticity = 0.3, double stiffness = 100.0, double damping = 0.8, Axis scrollDirection = Axis.vertical, ScrollController? controller, bool shrinkWrap = false, bool reverse = false, EdgeInsetsGeometry? padding, bool enabled = true})
-
Creates an elastic list view that builds items lazily.
const
Properties
-
children
→ List<
Widget> ? -
The items of the list.
nullwhen using ElasticListView.builder.final - controller → ScrollController?
-
Optional external scroll controller. The caller keeps ownership.
final
- damping → double
-
See ElasticScrollPhysics.damping. Defaults to
0.8.final - elasticity → double
-
See ElasticScrollPhysics.elasticity. Defaults to
0.3.final - enabled → bool
-
When
falsethe elastic physics are not applied.final - hashCode → int
-
The hash code for this object.
no setterinherited
- itemBuilder → IndexedWidgetBuilder?
-
Lazily builds each item.
nullwhen using the default constructor.final - itemCount → int?
-
Number of items for ElasticListView.builder.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- padding → EdgeInsetsGeometry?
-
Padding around the items.
final
- reverse → bool
-
Whether the list reads in the reverse direction.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollDirection → Axis
-
The axis along which the list scrolls. Defaults to Axis.vertical.
final
- shrinkWrap → bool
-
Whether the list sizes itself to its children. Defaults to
false.final - stiffness → double
-
See ElasticScrollPhysics.stiffness. Defaults to
100.0.final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this 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, int wrapWidth = 65}) → 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