TListTheme constructor

const TListTheme({
  1. TListAnimationBuilder? animationBuilder = TListAnimationBuilders.staggered,
  2. Duration animationDuration = const Duration(milliseconds: 800),
  3. bool shrinkWrap = false,
  4. ScrollPhysics? physics,
  5. EdgeInsets? padding,
  6. TListEmptyBuilder? emptyStateBuilder,
  7. TListErrorBuilder? errorStateBuilder,
  8. TListLoadingBuilder? loadingBuilder,
  9. TListHeaderBuilder? headerBuilder,
  10. bool? headerSticky,
  11. TListFooterBuilder? footerBuilder,
  12. bool? footerSticky,
  13. bool? infiniteScroll,
  14. double? itemBaseHeight,
  15. required TListFooterBuilder infiniteScrollFooterBuilder,
  16. TListSeparatorBuilder? listSeparatorBuilder,
  17. TListDragProxyDecorator? dragProxyDecorator,
  18. TGridMode? grid,
  19. TGridDelegateBuilder? gridDelegate,
})

Creates a list theme.

Implementation

const TListTheme({
  this.animationBuilder = TListAnimationBuilders.staggered,
  this.animationDuration = const Duration(milliseconds: 800),
  this.shrinkWrap = false,
  this.physics,
  this.padding,
  this.emptyStateBuilder,
  this.errorStateBuilder,
  this.loadingBuilder,
  this.headerBuilder,
  this.headerSticky,
  this.footerBuilder,
  this.footerSticky,
  this.infiniteScroll,
  double? itemBaseHeight,
  required this.infiniteScrollFooterBuilder,
  this.listSeparatorBuilder,
  this.dragProxyDecorator,
  this.grid,
  this.gridDelegate,
})  : assert(!shrinkWrap || infiniteScroll != true, 'TListTheme: shrinkWrap disables scrolling, so infiniteScroll cannot be used.'),
      assert(!shrinkWrap || headerSticky != true, 'TListTheme: shrinkWrap disables scrolling, so headerSticky cannot be used.'),
      assert(!shrinkWrap || footerSticky != true, 'TListTheme: shrinkWrap disables scrolling, so footerSticky cannot be used.'),
      itemBaseHeight = grid != null ? 200 : 40;