copyWith method

SliverGeometry copyWith({
  1. double? scrollExtent,
  2. double? paintExtent,
  3. double? paintOrigin,
  4. double? layoutExtent,
  5. double? maxPaintExtent,
  6. double? maxScrollObstructionExtent,
  7. double? crossAxisExtent,
  8. double? hitTestExtent,
  9. bool? visible,
  10. bool? hasVisualOverflow,
  11. double? cacheExtent,
})

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

Implementation

SliverGeometry copyWith({
  double? scrollExtent,
  double? paintExtent,
  double? paintOrigin,
  double? layoutExtent,
  double? maxPaintExtent,
  double? maxScrollObstructionExtent,
  double? crossAxisExtent,
  double? hitTestExtent,
  bool? visible,
  bool? hasVisualOverflow,
  double? cacheExtent,
}) {
  return SliverGeometry(
    scrollExtent: scrollExtent ?? this.scrollExtent,
    paintExtent: paintExtent ?? this.paintExtent,
    paintOrigin: paintOrigin ?? this.paintOrigin,
    layoutExtent: layoutExtent ?? this.layoutExtent,
    maxPaintExtent: maxPaintExtent ?? this.maxPaintExtent,
    maxScrollObstructionExtent: maxScrollObstructionExtent ?? this.maxScrollObstructionExtent,
    crossAxisExtent: crossAxisExtent ?? this.crossAxisExtent,
    hitTestExtent: hitTestExtent ?? this.hitTestExtent,
    visible: visible ?? this.visible,
    hasVisualOverflow: hasVisualOverflow ?? this.hasVisualOverflow,
    cacheExtent: cacheExtent ?? this.cacheExtent,
  );
}