Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Dart 引发了另一个异常:BoxConstraints强制无限高_Dart_Flutter - Fatal编程技术网

Dart 引发了另一个异常:BoxConstraints强制无限高

Dart 引发了另一个异常:BoxConstraints强制无限高,dart,flutter,Dart,Flutter,我正在尝试构建此小部件,它将产生: Another exception was thrown: BoxConstraints forces an infinite height. 这是我从超新星工作室得到的一个小部件,基于我在互联网上找到的草图。我知道生成器并没有真正考虑嵌套堆栈上的特殊约束,但我没能解决这个问题。问题是有些堆栈的高度是无限的,但我不知道是哪一个 以下是我试图构建的代码: return new Container( height: 900.0, margin:

我正在尝试构建此小部件,它将产生:

Another exception was thrown: BoxConstraints forces an infinite height.
这是我从超新星工作室得到的一个小部件,基于我在互联网上找到的草图。我知道生成器并没有真正考虑嵌套堆栈上的特殊约束,但我没能解决这个问题。问题是有些堆栈的高度是无限的,但我不知道是哪一个

以下是我试图构建的代码:

return new Container(
    height: 900.0,
    margin: EdgeInsets.only(top: 64),
    child: new Stack(
      fit: StackFit.expand,
      alignment: Alignment(0.0, 0.0),
      children: [
        new Positioned(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.stretch,
            mainAxisSize: MainAxisSize.max,
            children: [
              Stack(
                children: [
                  Row(
                    crossAxisAlignment: CrossAxisAlignment.stretch,
                    children: [
                      Container(
                        margin: EdgeInsets.only(left: 76),
                        child: Stack(
                          fit: StackFit.expand,
                          children: [
                            Column(
                              crossAxisAlignment: CrossAxisAlignment.stretch,
                              children: [
                                Container(
                                  margin: EdgeInsets.symmetric(horizontal: 10),
                                  decoration: BoxDecoration(
                                    color: Color.fromARGB(255, 59, 72, 89),
                                    borderRadius: BorderRadius.all(Radius.circular(10)),
                                  ),
                                ),
                              ],
                            ),
                            Column(
                              crossAxisAlignment: CrossAxisAlignment.stretch,
                              children: [
                                Container(
                                  margin: EdgeInsets.only(left: 10, top: 120, right: 10),
                                  decoration: BoxDecoration(
                                    color: Color.fromARGB(255, 59, 72, 89),
                                    borderRadius: BorderRadius.all(Radius.circular(10)),
                                  ),
                                ),
                              ],
                            ),
                            Column(
                              crossAxisAlignment: CrossAxisAlignment.stretch,
                              children: [
                                Container(
                                  margin: EdgeInsets.only(top: 80),
                                  decoration: BoxDecoration(
                                    color: Color.fromARGB(255, 131, 146, 167),
                                    borderRadius: BorderRadius.all(Radius.circular(10)),
                                  ),
                                ),
                              ],
                            ),
                            Column(
                              crossAxisAlignment: CrossAxisAlignment.stretch,
                              children: [
                                Container(
                                  margin: EdgeInsets.only(top: 20),
                                  decoration: BoxDecoration(
                                    color: Color.fromARGB(255, 131, 146, 167),
                                    borderRadius: BorderRadius.all(Radius.circular(10)),
                                  ),
                                ),
                              ],
                            ),
                          ],
                        ),
                      ),
                    ],
                  ),
                  Row(
                    crossAxisAlignment: CrossAxisAlignment.stretch,
                    children: [
                      Container(
                        margin: EdgeInsets.only(left: 66),
                        child: Image.asset(
                          "assets/photo-2.png",
                          fit: BoxFit.cover,
                        ),
                      ),
                    ],
                  ),
                ],
              ),
              Container(

                margin: EdgeInsets.only(left: 134, top: 11),
                child: Text(
                  "${audioPlayer.isPlayingSong.title} \n${audioPlayer.isPlayingSong.artist}",
                  style: TextStyle(
                    color: Color.fromARGB(88, 255, 255, 0),
                    fontSize: 24,
                    letterSpacing: 0.82,
                    fontFamily: "",
                  ),
                  textAlign: TextAlign.center,
                ),
              ),
              Expanded(
                flex: 1,
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.end,
                  crossAxisAlignment: CrossAxisAlignment.stretch,
                  children: [
                    Container(

                      child: Image.asset(
                        "assets/wave.png",
                        fit: BoxFit.cover,
                      ),
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),

      ],
    ),
  );