zoukankan      html  css  js  c++  java
  • flutter Dialog里ListView的问题

        showDialog(
            context: context,
            builder: (ctx) {
              return
    
    //            Dialog(
    //            child: Container(
    //              padding: EdgeInsets.fromLTRB(24.0, 0.0, 24.0, 0.0),
    //              decoration: BoxDecoration(
    //                color: Colors.transparent,
    //                shape: BoxShape.rectangle,
    //                borderRadius: BorderRadius.circular(20.0),
    //                image: DecorationImage(
    //                  repeat: ImageRepeat.repeat,
    //                  image: CachedNetworkImageProvider("http://" +
    //                      ServerConfig.static_url +
    //                      "/xxxxx/xxx/xxxxx.jpg" +
    //                      "?x-oss-process=style/phone"),
    //                ),
    //              ),
    //              constraints: BoxConstraints.loose(Size(
    //                  double.infinity, MediaQuery.of(context).size.height / 2)),
    ////            height: MediaQuery.of(context).size.height/2,
    //              child: Center(
    //                child: Container(
    //                  padding: EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 5.0),
    //                  decoration: BoxDecoration(
    //                    color: Colors.white,
    //                    shape: BoxShape.rectangle,
    //                    borderRadius: BorderRadius.circular(20.0),
    //                  ),
    //                  child: new Form(
    //                      child: new Column(
    //                    mainAxisSize: MainAxisSize.min,
    //                    children: <Widget>[
    //                      new Flexible(
    //                          child: new ListView(
    //                        shrinkWrap: true,
    //                        children: dialogContent,
    //                      ))
    //                    ],
    //                  )),
    //                ),
    //              ),
    //            ),
    //          );
    
                new Dialog(
                  child: new SingleChildScrollView(
                    child: new Material(
                      child: ListBody(children: dialogContent,),
                    ),
                  ),
                );
    
    
    
    
    
            });

    两种解决方式分别用了 两种颜色标记

    ps : 

  • 相关阅读:
    Databases Questions & Answers
    SQL语句
    常见的数据库基础面试题大全
    关于GET POST
    经常遇到的浏览器兼容性问题
    关于JavaScript中apply与call的用法意义及区别(转)
    js闭包的用途
    深入理解js闭包
    undefined与null的区别
    HeapSort快速排序
  • 原文地址:https://www.cnblogs.com/LiuPan2016/p/10453867.html
Copyright © 2011-2022 走看看