【发布时间】:2021-02-18 21:35:02
【问题描述】:
这是一组扩展图块。在这里,我想在容器内扭曲扩展瓦片,以便我可以为瓦片提供边框、形状和阴影。还 我希望扩展结果与此相同。我怎样才能做到这一点。请帮帮我
我尝试了以下模式。但是当我展开我得到渲染溢出错误
Container(
height: 80,
width: MediaQuery.of(context).size.width - 10,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Theme.of(context).hintColor.withOpacity(0.2),
spreadRadius: 2,
blurRadius: 5)
],
),
child:
ExpansionTile(
backgroundColor: Colors.white,
trailing: Icon(Icons.arrow_forward_ios_rounded),
initiallyExpanded: false,
title: Text(
'Messages',
style: Theme.of(context)
.textTheme
.subtitle),
children: List.generate(
3, (indexProduct) {
return Text("terwyteuwte");
}),
)
),
请帮帮我..
【问题讨论】:
-
SingleChildScrollView(child: Container(...)) -
@pskink 谢谢......它不会动态改变容器的大小......这怎么可能?
-
是的,它改变了容器的大小
标签: android-studio flutter dart flutter-layout flutter-widget