letsar / local_hero

A widget which implicitly launches a hero animation when its position changed within the same route.
MIT License
208 stars 48 forks source link

Fix #5 by preventing painting when the RenderLocalHeroLeaderLayer is detached #16

Closed Snonky closed 10 months ago

Snonky commented 1 year ago

The failed assertion (!_debugDisposed is not true) from #5 comes from the animation status listener of RenderLocalHeroLeaderLayer. It marks itself for paint when the animation finishes despite already being disposed.

The PR #14 attempts to solve the same issue but relies on the debugDisposed which should not be used outside assert.

The check can be done using the attached property.

Also removed an unused dependency from the example.

felipecastrosales commented 10 months ago

any expectation in this pr @letsar ?

letsar commented 10 months ago

Thank you ❤️