Skip to content

Reassemble method called too late when hot reloading #26503

@rrousselGit

Description

@rrousselGit

Consider a widget that rebuilds very often (typically because of an animation).
Then consider editing the sources of that widgets through hot-reload.

It seems that when doing so, there's a chance for build method to be called before reassemble was, but with the updated content.

This is a big issue for the following open source library: https://github.com/rrousselGit/flutter_hooks
As it needs to override the reassemble behavior to handle potential changes within build method.

But if build method is called before reassemble, then the library won't be ready for it and the app will enter into an invalid state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityframeworkflutter/packages/flutter repository. See also f: labels.t: hot reloadReloading code during "flutter run"team-frameworkOwned by Framework teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions