HugeListView<T> class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- HugeListView
Constructors
-
HugeListView({Key? key, @Deprecated('Use `scrollController` instead.') ItemScrollController? controller, ItemScrollController? scrollController, HugeListViewController? listViewController, required int pageSize, required int startIndex, @Deprecated('Use `totalItemCount` of the `listViewController` instead.') int? totalCount, required HugeListViewPageFuture<
T> pageFuture, required ScrollThumbBuilder thumbBuilder, required HugeListViewItemBuilder<T> itemBuilder, required IndexedWidgetBuilder placeholderBuilder, WidgetBuilder? waitBuilder, @Deprecated('Use `emptyBuilder` instead.') WidgetBuilder? emptyResultBuilder, WidgetBuilder? emptyBuilder, HugeListViewErrorBuilder? errorBuilder, double velocityThreshold = 128, ValueChanged<int> ? firstShown, Axis scrollDirection = Axis.vertical, Color thumbBackgroundColor = Colors.white, Color thumbDrawColor = Colors.grey, double thumbHeight = 48.0, bool alwaysVisibleThumb = true, Duration thumbAnimationDuration = kThemeAnimationDuration, Duration thumbVisibleDuration = const Duration(milliseconds: 1000), EdgeInsets? padding, LruMap<int, HugeListViewPageResult< ? lruMap})T> > -
const
Properties
- alwaysVisibleThumb → bool
-
Whether the scroll thumb slides out when not used, defaults to always visible.
final
- controller → ItemScrollController?
-
An optional
ScrollablePositionedList
controller for jumping or scrolling to an item.final - emptyBuilder → WidgetBuilder?
-
Called to build a widget when the list is empty.
final
- emptyResultBuilder → WidgetBuilder?
-
Called to build a widget when the list is empty.
final
- errorBuilder → HugeListViewErrorBuilder?
-
Called to build a widget when there is an error.
final
-
firstShown
→ ValueChanged<
int> ? -
Event to call with the index of the topmost visible item in the viewport while scrolling.
Can be used to display the current letter of an alphabetically sorted list, for instance.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
itemBuilder
→ HugeListViewItemBuilder<
T> -
Called to build an individual item with the specified
index
.final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- listViewController → HugeListViewController?
-
An optional HugeListViewController controller to control the behavior of the list.
final
-
lruMap
→ LruMap<
int, HugeListViewPageResult< ?T> > -
The optional predefined LruMap to be used for cache, convenient for using LruMap outside HugeListView.
final
- padding → EdgeInsets?
-
The amount of space by which to inset the list.
final
-
pageFuture
→ HugeListViewPageFuture<
T> -
Called to build items for the list with the specified
pageIndex
.final - pageSize → int
-
Size of the page. HugeListView only keeps a few pages of items in memory any time.
final
- placeholderBuilder → IndexedWidgetBuilder
-
Called to build a placeholder while the item is not yet availabe.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ItemScrollController?
-
An optional
ScrollablePositionedList
controller for jumping or scrolling to an item.final - scrollDirection → Axis
-
The axis along which the list view scrolls.
final
- startIndex → int
-
Index of an item to initially align within the viewport.
final
- thumbAnimationDuration → Duration
-
How quickly the scroll thumb animates in and out. Ignored if
alwaysVisibleThumb
is true.final - thumbBackgroundColor → Color
-
Background color of scroll thumb, defaults to white.
final
- thumbBuilder → ScrollThumbBuilder
-
Called to build the thumb. One of DraggableScrollbarThumbs.RoundedRectThumb, DraggableScrollbarThumbs.ArrowThumb
or DraggableScrollbarThumbs.SemicircleThumb, or build your own.
final
- thumbDrawColor → Color
-
Drawing color of scroll thumb, defaults to gray.
final
- thumbHeight → double
-
Height of scroll thumb, defaults to 48.
final
- thumbVisibleDuration → Duration
-
How long the scroll thumb stays visible before disappearing. Ignored if
alwaysVisibleThumb
is true.final - totalCount → int?
-
Total number of items in the list.
final
- velocityThreshold → double
-
The velocity above which the individual items stop being drawn until the scrolling rate drops.
final
- waitBuilder → WidgetBuilder?
-
Called to build a progress widget while the whole list is initialized.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → HugeListViewState< T> -
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