copyWith method
TListTheme
copyWith({
- TListAnimationBuilder? animationBuilder,
- Duration? animationDuration,
- bool? shrinkWrap,
- ScrollPhysics? physics,
- EdgeInsetsGeometry? padding,
- Widget emptyStateBuilder(
- BuildContext context
- String? emptyStateMessage,
- IconData? emptyStateIcon,
- Widget errorStateBuilder(
- BuildContext context,
- TListError error
- String? errorStateMessage,
- Widget loadingBuilder(
- BuildContext context
- Widget? headerWidget,
- bool? headerSticky,
- bool? needsHorizontalScroll,
- double? horizontalScrollWidth,
- bool? infiniteScroll,
- double? itemBaseHeight,
- String? loadingMessage,
- String? noMoreItemsMessage,
- Widget separatorBuilder(
- BuildContext context,
- int index
- bool? showSeparators,
- double? itemSpacing,
Implementation
TListTheme copyWith({
TListAnimationBuilder? animationBuilder,
Duration? animationDuration,
bool? shrinkWrap,
ScrollPhysics? physics,
EdgeInsetsGeometry? padding,
// Empty state
Widget Function(BuildContext context)? emptyStateBuilder,
String? emptyStateMessage,
IconData? emptyStateIcon,
// Error state
Widget Function(BuildContext context, TListError error)? errorStateBuilder,
String? errorStateMessage,
// Loading state
Widget Function(BuildContext context)? loadingBuilder,
// Header
Widget? headerWidget,
bool? headerSticky,
// Footer
Widget? footerWidget,
bool? footerSticky,
// Horizontal scroll
bool? needsHorizontalScroll,
double? horizontalScrollWidth,
// Infinite scroll
bool? infiniteScroll,
double? itemBaseHeight,
String? loadingMessage,
String? noMoreItemsMessage,
// Separators
Widget Function(BuildContext context, int index)? separatorBuilder,
bool? showSeparators,
// Spacing
double? itemSpacing,
}) {
return TListTheme(
animationBuilder: animationBuilder ?? this.animationBuilder,
animationDuration: animationDuration ?? this.animationDuration,
shrinkWrap: shrinkWrap ?? this.shrinkWrap,
physics: physics ?? this.physics,
padding: padding ?? this.padding,
emptyStateBuilder: emptyStateBuilder ?? this.emptyStateBuilder,
emptyStateMessage: emptyStateMessage ?? this.emptyStateMessage,
emptyStateIcon: emptyStateIcon ?? this.emptyStateIcon,
errorStateBuilder: errorStateBuilder ?? this.errorStateBuilder,
errorStateMessage: errorStateMessage ?? this.errorStateMessage,
loadingBuilder: loadingBuilder ?? this.loadingBuilder,
headerWidget: headerWidget ?? this.headerWidget,
headerSticky: headerSticky ?? this.headerSticky,
footerWidget: footerWidget ?? this.footerWidget,
footerSticky: footerSticky ?? this.footerSticky,
needsHorizontalScroll: needsHorizontalScroll ?? this.needsHorizontalScroll,
horizontalScrollWidth: horizontalScrollWidth ?? this.horizontalScrollWidth,
infiniteScroll: infiniteScroll ?? this.infiniteScroll,
itemBaseHeight: itemBaseHeight ?? this.itemBaseHeight,
loadingMessage: loadingMessage ?? this.loadingMessage,
noMoreItemsMessage: noMoreItemsMessage ?? this.noMoreItemsMessage,
separatorBuilder: separatorBuilder ?? this.separatorBuilder,
showSeparators: showSeparators ?? this.showSeparators,
itemSpacing: itemSpacing ?? this.itemSpacing,
);
}