UI颤抖关于列和行

时间:2019-09-22 11:43:53

标签: flutter dart

我有这样的设计

click image

我尝试在该列中添加2行,但出现错误。也就是说,它超出了屏幕或图表可能无法显示

这是我的代码

body: RefreshIndicator(
          child: Row(
            mainAxisSize: MainAxisSize.max,
            children: <Widget>[
              Expanded(
                child: GestureDetector(
                  child: Container(
                    margin: EdgeInsets.only(bottom: 320),
                    child: chart,
                  ),
                  onTap: (){
                    _showDialog();
                  },
                ),
              ),
              Expanded(
                child: Column(
                  children: <Widget>[
                    RaisedButton(
                      padding: const EdgeInsets.symmetric(vertical: 50, horizontal: 65),
                      textColor: Colors.white,
                      color: Colors.blue,
                      onPressed: (){},
                      child: new Text("LAPOR"),
                    ),
                    RaisedButton(
                      padding: const EdgeInsets.symmetric(vertical: 50, horizontal: 36),
                      textColor: Colors.white,
                      color: Colors.redAccent,
                      onPressed: (){},
                      child: new Text("PENGUMPULAN"),
                    ),
                  ],
                ),
              ),
            ],
          ),
          onRefresh: _showDialog
      )

1 个答案:

答案 0 :(得分:0)