UIProListView class

A customizable list view with built-in shimmer loading state.

UIProListView automatically shows shimmer placeholders while loading and transitions to actual content when data is ready. NO circular progress indicators - only shimmer skeletons.

Example:

UIProListView(
  isLoading: isLoading,
  itemCount: items.length,
  itemBuilder: (context, index) => ListTile(
    title: Text(items[index].title),
  ),
)

With custom shimmer:

UIProListView(
  isLoading: isLoading,
  itemCount: items.length,
  shimmerItemBuilder: (context, index) => MyCustomShimmer(),
  itemBuilder: (context, index) => MyListItem(items[index]),
)
Inheritance

Constructors

UIProListView({Key? key, required bool isLoading, required int itemCount, required Widget itemBuilder(BuildContext context, int index), int shimmerItemCount = 5, Widget shimmerItemBuilder(BuildContext context, int index)?, Widget separatorBuilder(BuildContext context, int index)?, EdgeInsets? padding, bool shrinkWrap = false, ScrollPhysics? physics, ScrollController? controller, Axis scrollDirection = Axis.vertical, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, Widget? emptyWidget, UIProListShimmerType shimmerType = UIProListShimmerType.listItem, bool shimmerShowAvatar = true, bool shimmerShowSubtitle = true, bool shimmerShowTrailing = false, bool useAutoShimmer = false})
Creates a list view with shimmer loading state.
const
UIProListView.separated({Key? key, required bool isLoading, required int itemCount, required Widget itemBuilder(BuildContext context, int index), required Widget separatorBuilder(BuildContext context, int index)?, int shimmerItemCount = 5, Widget shimmerItemBuilder(BuildContext context, int index)?, EdgeInsets? padding, bool shrinkWrap = false, ScrollPhysics? physics, ScrollController? controller, Axis scrollDirection = Axis.vertical, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, Widget? emptyWidget, UIProListShimmerType shimmerType = UIProListShimmerType.listItem, bool shimmerShowAvatar = true, bool shimmerShowSubtitle = true, bool shimmerShowTrailing = false, bool useAutoShimmer = false})
Creates a list view with separated items.
const

Properties

addAutomaticKeepAlives bool
Whether to add automatic keep-alives.
final
addRepaintBoundaries bool
Whether to add repaint boundaries.
final
controller ScrollController?
Scroll controller.
final
emptyWidget Widget?
Empty state widget shown when itemCount is 0 and not loading.
final
hashCode int
The hash code for this object.
no setterinherited
isLoading bool
Whether the list is in loading state.
final
itemBuilder Widget Function(BuildContext context, int index)
Builder for list items.
final
itemCount int
Number of items in the list.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
padding EdgeInsets?
Padding around the list.
final
physics ScrollPhysics?
Scroll physics.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollDirection Axis
Scroll direction.
final
separatorBuilder Widget Function(BuildContext context, int index)?
Separator builder between items.
final
shimmerItemBuilder Widget Function(BuildContext context, int index)?
Custom shimmer item builder.
final
shimmerItemCount int
Number of shimmer items to show when loading.
final
shimmerShowAvatar bool
Whether to show shimmer avatar.
final
shimmerShowSubtitle bool
Whether to show shimmer subtitle.
final
shimmerShowTrailing bool
Whether to show shimmer trailing.
final
shimmerType UIProListShimmerType
Default shimmer type for auto-generated shimmers.
final
shrinkWrap bool
Whether the list scrolls.
final
useAutoShimmer bool
Whether to use auto-shimmer mode.
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