QuickScrollbar class

A quick scrollbar not only indicates which portion of a Scrollable widget is actually visible, but also control the scroll position of Scrollable widget by ScrollController.

Quick scrollbar support the drag gesture to scroll the Scrollable widget quickly. for example:

  QuickScrollbar(
     child: ListView.builder(
        itemCount: 1000,
        // Specifying an [itemExtent] or [prototypeItem]  is more efficient
        // than letting the children determine their own extent when use QuickScrollbar.
        //itemExtent: 56,
        prototypeItem: const ListTile(title: Text("1")),
        itemBuilder: (ctx, index) => ListTile(
          title: Text("$index"),
          onTap: () => debugPrint('$index'),
        ),
      ),
    );
```dart
Inheritance

Constructors

QuickScrollbar({Key? key, ScrollController? controller, int velocity = 10, required Widget child})
const

Properties

child Widget
final
controller ScrollController?
The Scrollable widget's Controller, by which quick scrollbar will control the scroll position of Scrollable widget.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
velocity int
Critical value that determine to show QuickScrollbar. If the scroll delta offset greater than velocity, the quick scrollbar will show.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _QuickScrollBarState
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