ModelListView<T> class

Inheritance

Constructors

ModelListView({Key? key, required List<T> list, required Future<void> load(), required bool loadedAll, required ModelListViewBuilder<T> builder, bool doNotLoadOnInit = false, Future<void> refresh()?, String? error, double treshold = 200, Widget errorBuilder(BuildContext context, String error)?, Widget? loadingWidget, Widget? noResultsWidget, Widget? bottomLoader, Widget? firstChild, bool reverse = false})
const
ModelListView.grid({Key? key, required List<T> list, required Future<void> load(), required bool loadedAll, required ModelListViewBuilder<T> builder, Future<void> refresh()?, String? error, bool doNotLoadOnInit = false, ScrollController? scrollController, double treshold = 400, Widget errorBuilder(BuildContext context, String error)?, Widget? loadingWidget, Widget? noResultsWidget, Widget? bottomLoader, Widget? firstChild, bool reverse = false})
const
ModelListView.gridSliver({Key? key, required List<T> list, required Future<void> load(), required bool loadedAll, required ModelListViewBuilder<T> builder, required ScrollController? scrollController, double treshold = 400, bool doNotLoadOnInit = false, String? error, Widget errorBuilder(BuildContext context, String error)?, Widget? loadingWidget, Widget? noResultsWidget, Widget? bottomLoader, Widget? firstChild})
const
ModelListView.sliver({Key? key, required List<T> list, required Future<void> load(), required bool loadedAll, required ModelListViewBuilder<T> builder, bool doNotLoadOnInit = false, String? error, required ScrollController? scrollController, double treshold = 200, Widget errorBuilder(BuildContext context, String error)?, Widget? loadingWidget, Widget? noResultsWidget, Widget? bottomLoader, Widget? firstChild})
const
ModelListView.withScrollController({Key? key, required List<T> list, required Future<void> load(), required bool loadedAll, required ModelListViewBuilder<T> builder, bool doNotLoadOnInit = false, Future<void> refresh()?, String? error, ScrollController? scrollController, double treshold = 200, Widget errorBuilder(BuildContext context, String error)?, Widget? loadingWidget, Widget? noResultsWidget, Widget? bottomLoader, Widget? firstChild, bool reverse = false})
const

Properties

bottomLoader Widget?
Widget that will be rendered at the end of the list Default is CenterLoading
final
builder ModelListViewBuilder<T>
Builder method for the single element of the list
final
doNotLoadOnInit bool
The default behaviour of ModelListView is to call load method in the initState If this is not wanted set doNotLoadOnInit to false
final
error String?
When error is not null it will be rendered errorBuilder on the end of the list Useful to create a "try again" widget
final
errorBuilder → (Widget Function(BuildContext context, String error)?)
final
firstChild Widget?
Widget that will be rendered as the first child of the list Optional
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
list List<T>
The list of element to be rendered
final
load Future<void> Function()
Function to be called for load new elements Needed
final
loadedAll bool
bool parameters to tell ModelListView when stop to load more elements if not specified ModelListView will try to call load method undefinitely
final
loadingWidget Widget?
Widget that will be rendered on the first load and at the end of the list Default will be CenterLoading
final
noResultsWidget Widget?
Widget that will be rendered when list is empty and load method does not return any elements
final
refresh → (Future<void> Function()?)
Function to be called when refresh happens. Useless if sliver
final
reverse bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
ScrollController to be used with ModelListView. Needed if sliver
final
treshold double
Threshold of when load method will be called
final

Methods

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