Skip to content
Boring Doc
DeprecatedMedium impactOfficial migration guidesince 3.44.0landed 3.41.0-0.0.pre

Deprecated cacheExtent and cacheExtentStyle

Framework · Official source

Flutter 3.44 deprecates `cacheExtent` and `cacheExtentStyle` in scrolling-related widgets, such as `ListView`, `GridView`, `CustomScrollView`, and `Viewport`, and their corresponding render objects, such as `RenderViewport`. The new `scrollCacheExtent` property encapsulates both the value and the caching strategy (pixels or viewport).

Who is affected
Code that still calls the deprecated API; it keeps working until removal but produces analyzer warnings. Code that uses ListView, GridView, CustomScrollView and related APIs.
Practical impact
Warnings now; removal in a future release. Plan the migration but no immediate break.
What action should I take?
Follow the official migration guide below, update affected call sites, run `dart fix --apply` where a fix is available, then run your tests.
Official migration guide (excerpt, © The Flutter Authors, CC BY 3.0)

Widget layer

cacheExtent (pixels)

If your code uses cacheExtent, which defaults to pixels, use scrollCacheExtent with ScrollCacheExtent.pixels.

Before:

ListView(
  cacheExtent: 500.0,
  children: // ...
)

After:

ListView(
  scrollCacheExtent: const ScrollCacheExtent.pixels(500.0),
  children: // ...
)

cacheExtentStyle (viewport)

If your code uses cacheExtent with CacheExtentStyle.viewport, which is common in Viewport, use scrollCacheExtent with ScrollCacheExtent.viewport.

Before:

Viewport(
  cacheExtent: 0.5,
  cacheExtentStyle: CacheExtentStyle.viewport,
  slivers: // ...
)

After:

Viewport(
  scrollCacheExtent: const ScrollCacheExtent.viewport(0.5),
  slivers: // ...
)

Render object layer

If your code manually sets properties on RenderViewport or a similar render object, use scrollCacheExtent.

Before:

renderViewport.cacheExtent = 500.0;
renderViewport.cacheExtentStyle = CacheExtentStyle.pixel;

After:

renderViewport.scrollCacheExtent = const ScrollCacheExtent.pixels(500.0);
Migration assistantAI-generated · grounded in cited sources
AI explanations are not configured
Set AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.
Official migration guide·Verified classification (90%)

Listed in the official breaking-changes index; title states deprecation.

An official announcement or migration guide documents an intended behaviour or API change. A verified source change (git diff) shows code changed but does not by itself prove a public API is breaking. AI interpretations are labelled and never used to classify a change.

Source commit
b3045439b7c0
Source last updated
Oct 21, 2026
Last synchronized
Oct 21, 2026
Publication status
published
Publication history
  • Oct 21, 2026, 8:31 PM: new → published (ingestion) — Backed by an official breaking-change/migration guide.
AI explanationAI-generated · grounded in cited sources
AI explanations are not configured
Set AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.
Was this useful?