• Hixie's avatar
    Make the FAB move up when a Snack Bar slides in. · 56d40334
    Hixie authored
    This changes how SnackBar works so you can use it anywhere, not just on
    the bottom edge of the screen (it used to rely on overflowing its bounds
    and having negative offsets... I'm not really sure how hit testing
    worked on it before!).
    
    To do this I introduced a new RenderBox, RenderOverflowBox, that lets
    you set your child's size independent of your own. I needed this so that
    the snack bar could use a SquashTransition to change its size, while not
    affecting the layout of its child. This is exposed as OverflowBox in
    fn3. I'm not sure if it's the best API. It doesn't let you position the
    child (which is an issue if the size you give is smaller), it doesn't
    let you give a loose constraint (which maybe you might want?). But it
    handles this use case, so for now it's probably ok.
    
    Making the FAB get repositioned out of the way of the Snack Bar is now
    done in the Scaffold, which is in charge of positioning both of those
    and is the place that knows that both exist.
    56d40334
Name
Last commit
Last update
examples Loading commit data...
packages Loading commit data...