Skip to content

RenderAnimatedSize animates size unnecessarily #11307

@yjbanov

Description

@yjbanov

The logic in RenderAnimatedSize is buggy. It begins animation even when the target size is the same as the starting size. This causes AnimatedCrossFade, which uses it internally, to always animate even when the fade animation is finished.

To reproduce add a few AnimatedCrossFade items in a ListView.builder and scroll back and forth. Observe in the performance overlay that when an item is detached and reattached it triggers noop animation frames for the duration passed to RenderAnimatedSize and also triggers unnecessary child layout.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions