Flutter 行中的颤振图标未使用AnimatedContainer设置动画

Flutter 行中的颤振图标未使用AnimatedContainer设置动画,flutter,animatedcontainer,Flutter,Animatedcontainer,我试图使用动画容器在行中隐藏一些图标,但我不明白为什么图标总是保持在那里,而其他小部件将与行一起隐藏 这是我的密码: class BuildThemeChooser extends StatelessWidget { final bool isDark; BuildThemeChooser({this.isDark}); @override Widget build(BuildContext context) { return AnimatedContainer(

我试图使用
动画容器
中隐藏一些图标,但我不明白为什么图标总是保持在那里,而其他小部件将与
行一起隐藏

这是我的密码:

class BuildThemeChooser extends StatelessWidget {
  final bool isDark;
  BuildThemeChooser({this.isDark});

  @override
  Widget build(BuildContext context) {
    return AnimatedContainer(
      height: !isDark ? 100.0 : 0.0,
      duration: Duration(seconds: 1),
      curve: Curves.fastOutSlowIn,
      child: Row(
        children: [
          Icon(Icons.ac_unit),
          Icon(Icons.ac_unit),
          Icon(Icons.ac_unit),
          FlutterLogo(),
          FlutterLogo(),
          FlutterLogo(),
        ],
      ),
    );
  }
}
你知道我做错了什么吗

谢谢