【发布时间】:2020-04-27 18:41:45
【问题描述】:
我是 Flutter 的新手。我有一个设置容器高度的代码。 在这里请检查,如果条件成立,其设置高度 100 否则 60,我想将 60 设置为其孩子的高度。意味着它应该必须
selectedIndex != null && showExpanded == true ? 100 : (取决于孩子的身高),
这是我的代码...
height: selectedIndex != null && showExpanded == true
? 100
: 60,
duration: Duration(milliseconds: 300),
// Provide an optional curve to make the animation feel smoother.
curve: Curves.fastOutSlowIn,
decoration: BoxDecoration(
border:
Border.all(width: 1, color: HexColor("#BCE0FD"))),)
【问题讨论】:
标签: flutter dart flutter-animation