I have this animated container:
AnimatedContainer(
width: ScreenSize.getScreenWidth(context),
height: _selectAll ? 10 : bottomBarHeight,
color: _selectAll ? Colors.red : Colors.green,
duration: const Duration(seconds: 2),
curve: Curves.fastLinearToSlowEaseIn,
child: const FlutterLogo(size: 75),
),
I want that when _selectAll
is true, the container appears starting from bottom to top and when _selectAll
is false, the container dissapears starting from top to bottom.
In this version the container behaves the exact opposite way (when false, goes bottom to top, when true goes top to bottom
2
Answers
ANSWER Wrap the container in a
Column
withmainAxisAlignment: MainAxisAlignment.end,
Have you tried AnimatedAlign widget?
Here is a sample code based on your code