copyWith method

AnimatedSliverInfiniteListOptions copyWith({
  1. bool? reverse,
  2. EdgeInsets? padding,
  3. AlwaysScrollableScrollPhysics? scrollPhysics,
  4. int? bottomLoadingTriggerItemDistance,
  5. int? loadMoreTriggerItemDistance,
  6. bool? initialAnimation,
  7. Duration? insertDuration,
  8. Duration? deleteDuration,
  9. AnimatedChildBuilder? insertAnimation,
  10. AnimatedChildBuilder? deleteAnimation,
})

Implementation

AnimatedSliverInfiniteListOptions copyWith({
  bool? reverse,
  EdgeInsets? padding,
  AlwaysScrollableScrollPhysics? scrollPhysics,
  int? bottomLoadingTriggerItemDistance, // legacy alias
  int? loadMoreTriggerItemDistance,
  bool? initialAnimation,
  Duration? insertDuration,
  Duration? deleteDuration,
  AnimatedChildBuilder? insertAnimation,
  AnimatedChildBuilder? deleteAnimation,
}) {
  return AnimatedSliverInfiniteListOptions(
    reverse: reverse ?? this.reverse,
    padding: padding ?? this.padding,
    scrollPhysics: scrollPhysics ?? this.scrollPhysics,
    loadMoreTriggerItemDistance:
        (bottomLoadingTriggerItemDistance ?? loadMoreTriggerItemDistance) ??
            this.loadMoreTriggerItemDistance,
    initialAnimation: initialAnimation ?? this.initialAnimation,
    insertDuration: insertDuration ?? this.insertDuration,
    deleteDuration: deleteDuration ?? this.deleteDuration,
    insertAnimation: insertAnimation ?? this.insertAnimation,
    deleteAnimation: deleteAnimation ?? this.deleteAnimation,
  );
}