cacheExtent property

  1. @Deprecated('Use scrollCacheExtent instead. ' 'This feature was deprecated after v3.41.0-0.0.pre.')
double get cacheExtent

Deprecated. Use scrollCacheExtent instead.

Implementation

@Deprecated(
  'Use scrollCacheExtent instead. '
  'This feature was deprecated after v3.41.0-0.0.pre.',
)
double get cacheExtent => _scrollCacheExtent.value;
  1. @Deprecated('Use scrollCacheExtent instead. ' 'This feature was deprecated after v3.41.0-0.0.pre.')
set cacheExtent (double? value)

Implementation

@Deprecated(
  'Use scrollCacheExtent instead. '
  'This feature was deprecated after v3.41.0-0.0.pre.',
)
set cacheExtent(double? value) {
  if (value == cacheExtent) {
    return;
  }
  if (value == null) {
    _scrollCacheExtent = const ScrollCacheExtent.pixels(
      RenderAbstractViewport.defaultCacheExtent,
    );
  } else {
    _scrollCacheExtent = switch (cacheExtentStyle) {
      CacheExtentStyle.pixel => ScrollCacheExtent.pixels(value),
      CacheExtentStyle.viewport => ScrollCacheExtent.viewport(value),
    };
  }
  markNeedsLayout();
}