SliverAutoListView<T> class

Inheritance

Properties

customBuilder Iterable<Widget> Function(BuildContext context, List<T> items)?
final
defaultBuilder Widget Function(BuildContext context, AutoListState<T> state)?
This builder renders whenever a new state type is created for the AutoListCubit. New state types are created by overriding AutoListState. You may not use this if you only use AutoListCubit in its regular cases.
final
displayMode DisplayMode
final
emptyBuilder WidgetBuilder?
final
errorBuilder Widget Function(BuildContext context, VoidCallback retry)?
Overrides the default error display
final
hashCode int
The hash code for this object.
no setterinherited
itemBuilder Widget Function(BuildContext context, T item)?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadingBuilder WidgetBuilder?
Overrides the default loader
final
loadingMoreBuilder WidgetBuilder?
final
loadRatio double
final
manualLoadMoreBuilder Widget Function(BuildContext context, VoidCallback load)?
final
onLoadingMoreError → dynamic Function(BuildContext context, AutoListErrorState<T> errorState)?
Callback fired when an AutoListErrorState error occurs
final
physics ScrollPhysics?
final
reverse bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollDirection Axis
final
shrinkWrap bool
final
viewType SliverViewType
final
wrapper Widget Function(BuildContext context, Widget child)?
final

Methods

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

Static Methods

get<T>({Key? key, SliverViewType viewType = SliverViewType.list, required AutoListCubit<T> cubit, bool autoManage = true, Widget itemBuilder(BuildContext context, T item)?, Widget wrapper(BuildContext context, Widget child)?, Iterable<Widget> customBuilder(BuildContext context, List<T> items)?, double loadRatio = 0.8, WidgetBuilder? loadingBuilder, WidgetBuilder? loadingMoreBuilder, WidgetBuilder? emptyBuilder, Widget errorBuilder(BuildContext context, VoidCallback retry)?, Widget defaultBuilder(BuildContext context, AutoListState<T> state)?, dynamic onLoadingMoreError(BuildContext context, AutoListErrorState<T> errorState)?, ScrollPhysics? physics, bool reverse = false, Axis scrollDirection = Axis.vertical, bool shrinkWrap = false}) Widget
Shows a CustomScrollView displaying the current state of the data list. Every item in builder must be a sliver. When scrolled at more than loadRatio, AutoListCubit.loadMore is called to fetch the next page of data
manual<T>({Key? key, SliverViewType viewType = SliverViewType.list, required AutoListCubit<T> cubit, bool autoManage = true, Widget itemBuilder(BuildContext context, T item)?, Widget separatorBuilder(BuildContext context, int index)?, Widget wrapper(BuildContext context, Widget child)?, Iterable<Widget> customBuilder(BuildContext context, List<T> items)?, Widget manualLoadMoreBuilder(BuildContext context, VoidCallback retry)?, WidgetBuilder? loadingBuilder, WidgetBuilder? loadingMoreBuilder, WidgetBuilder? emptyBuilder, Widget errorBuilder(BuildContext context, VoidCallback retry)?, Widget defaultBuilder(BuildContext context, AutoListState<T> state)?, dynamic onLoadingMoreError(BuildContext context, AutoListErrorState<T> errorState)?, ScrollPhysics? physics, bool reverse = false, Axis scrollDirection = Axis.vertical, bool shrinkWrap = false}) Widget
A SliverAutoListView that does not automatically fetch next data. Every item in the builder must be a sliver. Call AutoListCubit.loadMore to do so.