InfoList<T> class

A list widget that displays items with a consistent style. It can be used with any type of item, but provides a default builder for InfoItemBase.

Inheritance

Constructors

InfoList.new({required List<T> items, required Widget buildItem(T item), Color? backgroundColor, EdgeInsetsGeometry? contentPadding, bool shrinkWrap = true, Widget separatorBuilder(BuildContext, int)?, ScrollPhysics? physics, EdgeInsetsGeometry? itemPadding, BoxDecoration? itemDecoration, bool removeTopPadding = false, Widget? emptyWidget, bool isLoading = false, int skeletonCount = 3, Widget skeletonBuilder(BuildContext, int)?, Widget buildEmptyItem(BuildContext, List<T>)?, bool useSliver = false, ScrollController? controller, Key? key})
const

Properties

backgroundColor Color?
final
buildEmptyItem Widget Function(BuildContext, List<T>)?
final
buildItem Widget Function(T item)
final
contentPadding EdgeInsetsGeometry?
final
controller ScrollController?
final
emptyWidget Widget?
final
hashCode int
The hash code for this object.
no setterinherited
isLoading bool
final
itemDecoration BoxDecoration?
final
itemPadding EdgeInsetsGeometry?
final
items List<T>
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
physics ScrollPhysics?
final
removeTopPadding bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
separatorBuilder Widget Function(BuildContext, int)?
final
shrinkWrap bool
final
skeletonBuilder Widget Function(BuildContext, int)?
final
skeletonCount int
final
useSliver bool
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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

info({Key? key, required List<InfoItemBase> items, Color? backgroundColor, EdgeInsetsGeometry? contentPadding, bool shrinkWrap = true, Widget separatorBuilder(BuildContext, int)?, ScrollPhysics? physics, bool removeTopPadding = false, Widget? emptyWidget, bool isLoading = false, int skeletonCount = 3, Widget skeletonBuilder(BuildContext, int)?, Widget buildEmptyItem(BuildContext, List<InfoItemBase>)?, bool useSliver = false, ScrollController? controller}) InfoList<InfoItemBase>
Creates a default InfoList that works with InfoItemBase items. This is a convenience constructor that provides a default item builder.
when<T>({required AsyncValue<List<T>> value, required Widget buildItem(T item), Color? backgroundColor, EdgeInsetsGeometry? contentPadding, bool shrinkWrap = true, Widget separatorBuilder(BuildContext, int)?, ScrollPhysics? physics, EdgeInsetsGeometry? itemPadding, BoxDecoration? itemDecoration, bool removeTopPadding = false, Widget? emptyWidget, bool isLoading = false, int skeletonCount = 3, Widget skeletonBuilder(BuildContext, int)?, Widget buildEmptyItem(BuildContext, List<T>)?}) Widget
Creates an InfoList that handles AsyncValue data. This constructor automatically handles loading and error states.