RollerList class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- RollerList
Constructors
-
RollerList({List<
Widget> ? items, IndexedWidgetBuilder? builder, int? length, ValueChanged<int> ? onSelectedIndexChanged, int? initialIndex, double visibilityRadius = 1.0, double? width, double? height, Color dividerColor = Colors.black, double dividerThickness = 1.0, bool enabled = true, ScrollType scrollType = ScrollType.bothDirections, Key? key, VoidCallback? onScrollStarted}) -
You should provide either items list or builder function and length. Priority is
given to builder function. It is better to provide width and height. If these
parameters are omitted, widget will try to calculate based on the
initialIndex item size, but if one parameter is set it would not be
overwritten. visibilityRadius means how many widgets are visible on each
side of the selected widget.
key
can be used to set selected item programmatically via Global key. If enabled, user can scroll it, otherwise scrolling can be done only programmatically. onSelectedIndexChanged is called when scrolling is finished. builder function will get index with infinity range, so to get roller scroll effect it is required to use index %const
Properties
- builder → IndexedWidgetBuilder?
-
final
- dividerColor → Color
-
final
- dividerThickness → double
-
final
- enabled → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
final
- initialIndex → int?
-
final
-
items
→ List<
Widget> ? -
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- length → int?
-
final
- onScrollStarted → VoidCallback?
-
final
-
onSelectedIndexChanged
→ ValueChanged<
int> ? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollType → ScrollType
-
final
- visibilityRadius → double
-
final
- width → double?
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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