copyWith method

SliverConstraints copyWith ({AxisDirection axisDirection, GrowthDirection growthDirection, ScrollDirection userScrollDirection, double scrollOffset, double precedingScrollExtent, double overlap, double remainingPaintExtent, double crossAxisExtent, AxisDirection crossAxisDirection, double viewportMainAxisExtent, double remainingCacheExtent, double cacheOrigin })

Creates a copy of this object but with the given fields replaced with the new values.

Implementation

SliverConstraints copyWith({
  AxisDirection axisDirection,
  GrowthDirection growthDirection,
  ScrollDirection userScrollDirection,
  double scrollOffset,
  double precedingScrollExtent,
  double overlap,
  double remainingPaintExtent,
  double crossAxisExtent,
  AxisDirection crossAxisDirection,
  double viewportMainAxisExtent,
  double remainingCacheExtent,
  double cacheOrigin,
}) {
  return SliverConstraints(
    axisDirection: axisDirection ?? this.axisDirection,
    growthDirection: growthDirection ?? this.growthDirection,
    userScrollDirection: userScrollDirection ?? this.userScrollDirection,
    scrollOffset: scrollOffset ?? this.scrollOffset,
    precedingScrollExtent: precedingScrollExtent ?? this.precedingScrollExtent,
    overlap: overlap ?? this.overlap,
    remainingPaintExtent: remainingPaintExtent ?? this.remainingPaintExtent,
    crossAxisExtent: crossAxisExtent ?? this.crossAxisExtent,
    crossAxisDirection: crossAxisDirection ?? this.crossAxisDirection,
    viewportMainAxisExtent: viewportMainAxisExtent ?? this.viewportMainAxisExtent,
    remainingCacheExtent: remainingCacheExtent ?? this.remainingCacheExtent,
    cacheOrigin: cacheOrigin ?? this.cacheOrigin,
  );
}