• Ian Hickson's avatar
    Fix bug in AnimatedSwitcher (#22183) · 874df1ec
    Ian Hickson authored
    * Refactor AnimatedSwitcher
    
    This is mostly just a little bit of cleanup with hopefully no semantic
    changes, done to teach me how the code works so that I could fix a bug.
    
    * Add debugging information to AnimatedSwitcher
    
    * Fix AnimatedSwitcher to handle the case of back-to-back changes
    
    Previously, if a child was replaced the very next frame after it was
    added, we'd get confused because we tried to reverse the controller,
    which causes us to remove the child from the going-away list, before
    we had added the child to the list in the first place.
    
    The fix is just to move the reverse to after the add.
    874df1ec
animated_switcher.dart 15.5 KB