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 基于颤振动态数据扩展卡高度_Dart_Flutter - Fatal编程技术网

Dart 基于颤振动态数据扩展卡高度

Dart 基于颤振动态数据扩展卡高度,dart,flutter,Dart,Flutter,我需要根据动态数据设置卡片的高度。我的卡片不能显示卡片中的全部内容 Card( child: Container( padding: EdgeInsets.all(7.0), child: Wrap( direction: Axis.horizontal, spacing: 200.0, // gap between adjacent chips

我需要根据动态数据设置卡片的高度。我的卡片不能显示卡片中的全部内容

Card(
            child: Container(
              padding: EdgeInsets.all(7.0),
              child: Wrap(
                direction: Axis.horizontal,
                spacing: 200.0, // gap between adjacent chips
                runSpacing: 0.0,
                children: <Widget>[
                  Container(
                      height: 40.0,
                      decoration: new BoxDecoration(
                        color: Colors.grey[800],
                        borderRadius: new BorderRadius.only(
                          topLeft: const Radius.circular(10.0),
                          topRight: const Radius.circular(10.0),
                        ),
                      ),
                      child: Column(
                        children: <Widget>[
                          Align(
                            child: Container(
                              padding: EdgeInsets.fromLTRB(5, 0, 0, 0),
                              margin: const EdgeInsets.all(8.0),
                              child: Text(
                                contactUs.title,
                                style: Theme.of(context).textTheme.headline,
                              ),
                            ),
                          ),
                        ],
                      )),
                  Container(
                    padding: EdgeInsets.all(3.0),
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.start,
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: <Widget>[
                        Container(
                          child: Container(
                            child: Column(
                              children: <Widget>[
                                subtitlesLength > 0
                                    ? _listSubtitleSection(contactUs.subtitles)
                                    : Container(),
                              ],
                            ),
                          ),
                        ),
                        Container(
                          child: Column(
                            children: <Widget>[
                              contactUs.addresses.length > 0
                                  ? _listAddressSection(contactUs.addresses)
                                  : Container(),
                            ],
                          ),
                        ),
                        contactUs.email != ''
                            ? Container(
                                child: GestureDetector(
                                  child: Text(
                                    'Email: ' + contactUs.email,
                                    style: new TextStyle(
                                      color: Theme.of(context).primaryColor,
                                      height: 1.5,
                                      decoration: TextDecoration.underline,
                                    ),
                                  ),
                                  onTap: () {
                                    _launchURL(contactUs.email);
                                  },
                                ),
                              )
                            : Container(),
                        Container(
                          alignment: Alignment.centerLeft,
                          margin: const EdgeInsets.fromLTRB(8.0, 8.0, 8.0, 0.0),
                          child: Container(
                            child: Column(
                              children: <Widget>[
                                contactUs.links.length > 0
                                    ? _listLinksSection(contactUs.links)
                                    : Container(),
                              ],
                            ),
                          ),
                        ),
                        Container(
                          child: Column(
                            children: <Widget>[
                              Divider(
                                color: Theme.of(context).accentColor,
                              ),
                              FlatButton(
                                  color: Colors.white,
                                  child: Row(
                                    children: <Widget>[
                                      Icon(Icons.place,
                                          color:
                                              Theme.of(context).primaryColor),
                                      Text(
                                        'Show on maps',
                                        style: TextStyle(
                                            color:
                                                Theme.of(context).primaryColor),
                                      ),
                                    ],
                                  ),
                                  onPressed: () {
                                    launchMap(contactUs.map);
                                  }),
                            ],
                          ),
                        ),
                      ],
                    ),
                  ),
                ],
              ),
            ),
          )
卡(
子:容器(
填充:所有边缘设置(7.0),
孩子:包裹(
方向:水平轴,
间距:200.0,//相邻芯片之间的间隙
运行间距:0.0,
儿童:[
容器(
身高:40.0,
装饰:新盒子装饰(
颜色:颜色。灰色[800],
borderRadius:仅限新的borderRadius(
左上角:常数半径。圆形(10.0),
右上角:常数半径。圆形(10.0),
),
),
子:列(
儿童:[
对齐(
子:容器(
填充:从LTRB(5,0,0,0)开始的边缘设置,
边距:所有常数边集(8.0),
子:文本(
联系我们,
风格:Theme.of(context).textTheme.headline,
),
),
),
],
)),
容器(
填充:所有边缘设置(3.0),
子:列(
mainAxisAlignment:mainAxisAlignment.start,
crossAxisAlignment:crossAxisAlignment.start,
儿童:[
容器(
子:容器(
子:列(
儿童:[
字幕长度>0
?列表字幕部分(联系人字幕)
:Container(),
],
),
),
),
容器(
子:列(
儿童:[
contactUs.addresses.length>0
?列表地址部分(联系人地址)
:Container(),
],
),
),
contactUs.email!=''
?容器(
儿童:手势检测器(
子:文本(
“电子邮件:”+contactUs.Email,
样式:新文本样式(
颜色:主题。背景。原色,
身高:1.5,
装饰:textEdition.underline,
),
),
onTap:(){
_启动URL(contactUs.email);
},
),
)
:Container(),
容器(
对齐:alignment.centerLeft,
边距:LTRB(8.0,8.0,8.0,0.0)的常数边集,
子:容器(
子:列(
儿童:[
contactUs.links.length>0
?_列表链接部分(contactUs.links)
:Container(),
],
),
),
),
容器(
子:列(
儿童:[
分隔器(
颜色:主题。背景。强调颜色,
),
扁平按钮(
颜色:颜色,白色,
孩子:排(
儿童:[
图标(Icons.place,
颜色:
主题(上下文)。原色),
正文(
“在地图上显示”,
样式:TextStyle(
颜色:
主题(上下文)。原色),
),
],
),
已按下:(){
启动地图(contactUs.map);
}),
],
),
),
],
),
),
],
),
),
)
我正在将一半的数据加载到卡中,剩余的内容不显示。我试图将容器的高度放置在卡片中,但这不起作用。 我需要帮助来解决这个问题。感谢您的帮助。
提前感谢。

删除listView builder的itemExtent属性解决了此问题。

如果卡中的内容超过可用空间,您可以尝试使用SingleChildScrollview包装最外层的容器。您可能需要设置Columns的mainAxisSize属性