Skip to content

ListWheelScrollView Throws Unexpected Error Inside AnimatedContainer #140780

@gabrielmcreynolds

Description

@gabrielmcreynolds

Steps to reproduce

To reproduce place a ListWheelScrollView.useDelegate widget inside of an AnimatedContainer whose height is changing and the error while be thrown. In the example DartPad click the floating action button to expand/collapse the list. Interestingly, if it is a ListView instead of ListWheelScrollView.useDelegate then no error is thrown.

Expected results

The container should be clipped vertically as the AnimatedContainer expands size

Actual results

The actual behavior of the AnimatedContainer is as expected. However, each time the list is collapsed the following error is thrown:

======== Exception caught by rendering library =====================================================
The following assertion was thrown during paint():
'package:flutter/src/rendering/layer.dart': Failed assertion: line 1970 pos 12: 'value!.storage.every((double component) => component.isFinite)': is not true.
Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.yml
The relevant error-causing widget was: 
  ListWheelScrollView ListWheelScrollView: .... long stack trace

Code sample

Code is available on Dartpad: https://dartpad.dev/?id=da0bd3ccfc20f287b3bb912bfe3ecac6

Screenshots or Video

Screenshots / Video demonstration

image

Logs

No response

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.5, on macOS 14.2.1 23C71 darwin-x64, locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.3.2)
[✓] Connected device (3 available)
[✓] Network resources

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: error messageError messages from the Flutter frameworkf: scrollingViewports, list views, slivers, etc.found in release: 3.16Found to occur in 3.16found in release: 3.18Found to occur in 3.18frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions