Skip to content

ScrollCacheExtent is not publicly exported, cacheExtent migration does not work #189347

Description

@MustafaAdam

Steps to reproduce

  1. In your project, upgrade flutter to 3.44.6
  2. you receive an error that ListView.cacheExtent is deprecated and you can't use int or double.
  3. documentation says we should use scrollCacheExtent

Expected results

As per the documentation, this is supposed to work without issue.
Unless this documentation page is stale as per the warning on the page:
"

Important

These breaking change docs are accurate, as of the release under which they are published.
Over time, the workarounds described here might become inaccurate.
We don't, in general, keep these breaking change docs up to date as of each release.

"

Actual results

When I did the migration step in the documentation, and changed it to scrollCacheExtent: const ScrollCacheExtent.pixels(2000), I got an error Undefined name 'ScrollCacheExtent'.

Code sample

Code sample

It only worked when i did the following:

replaced this:

scrollCacheExtent: const ScrollCacheExtent.pixels(2000),

with

scrollCacheExtent: const .pixels(1600),

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.44.6, on Ubuntu 24.04.4 LTS 6.17.0-35-generic, locale en_US.UTF-8) [36ms]
    • Flutter version 3.44.6 on channel stable at /home/*****/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ee80f08bbf (4 days ago), 2026-07-08 15:02:06 -0700
    • Engine revision 83675ed276
    • Dart version 3.12.2
    • DevTools version 2.57.0
    • Feature flags: enable-web, no-enable-linux-desktop, no-enable-macos-desktop, no-enable-windows-desktop,
      enable-android, no-enable-ios, cli-animations, enable-native-assets, enable-swift-package-manager,
      omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration

[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [1,945ms]
    • Android SDK at /home/*****/Android/Sdk
    • Emulator version 36.4.9.0 (build_id 14788078) (CL:N/A)
    • Platform android-37.0, build-tools 36.1.0
    • ANDROID_HOME = /home/*****/Android/Sdk
    • ANDROID_SDK_ROOT = /home/*****/Android/Sdk
    • Java binary at: /usr/lib/jvm/java-17-openjdk-amd64/bin/java
      This JDK is specified in your Flutter configuration.
      To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 17.0.19+10-1-24.04.2-Ubuntu)
    • All Android licenses accepted.

[✓] Connected device (2 available)
    • Android device • android-arm64 • Android 14 (API 34)
    • Chrome • web-javascript • Google Chrome 150.0.7871.46

[✓] Network resources
    • All expected network resources are available.

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projectd: api docsIssues with https://api.flutter.dev/frameworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework teamworkaround availableThere is a workaround available to overcome the issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions