copyWith method

TListTheme copyWith({
  1. TListAnimationBuilder? animationBuilder,
  2. Duration? animationDuration,
  3. bool? shrinkWrap,
  4. ScrollPhysics? physics,
  5. EdgeInsetsGeometry? padding,
  6. Widget emptyStateBuilder(
    1. BuildContext context
    )?,
  7. String? emptyStateMessage,
  8. IconData? emptyStateIcon,
  9. Widget errorStateBuilder(
    1. BuildContext context,
    2. TListError error
    )?,
  10. String? errorStateMessage,
  11. Widget loadingBuilder(
    1. BuildContext context
    )?,
  12. Widget? headerWidget,
  13. bool? headerSticky,
  14. Widget? footerWidget,
  15. bool? footerSticky,
  16. bool? needsHorizontalScroll,
  17. double? horizontalScrollWidth,
  18. bool? infiniteScroll,
  19. double? itemBaseHeight,
  20. String? loadingMessage,
  21. String? noMoreItemsMessage,
  22. Widget separatorBuilder(
    1. BuildContext context,
    2. int index
    )?,
  23. bool? showSeparators,
  24. 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,
  );
}