Skip to content

Document how to do animations at the render object layer #6741

@Hixie

Description

@Hixie

(From Mikkel:)

It may be helpful to document the preferred approach to animations [at the RenderObject/RenderBox layer].

My current understanding is that when animations (i.e. the lerp values) can be described adequately at the Widget level, that's where animation should be implemented, by arranging for setState on some StatefulWidget to be called at each animation tick.

But sometimes you seem to need to transform between the layouts calculated for your start and end widgets instead. The two cases we have seen involve size-dependent layouts containing animation-relevant information not present at the widget level. That moves animation code into the rendering layer, and it would be nice to have a standard way of accomplishing that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: animationAnimation APIsc: proposalA detailed proposal for a change to Flutterd: api docsIssues with https://api.flutter.dev/frameworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions