【发布时间】:2021-03-22 11:26:17
【问题描述】:
我有一个要展开的容器,我单击向下箭头按钮。如果您查看这张图片 (https://gyazo.com/eeaa9fb8d3f93d5f6f190ced2389e2e1),您会看到我已经添加了一个我想要单击的按钮,以便它会展开。但是,一旦我将容器包装在扩展拼贴中,它会在其左侧添加一个箭头,如您在这张图片中看到的 (https://gyazo.com/c8ec072e511f7f0d03ff925c2d8f158d)。
我的代码在这里,结果在第二张图片中
Container(
width: MediaQuery.of(context).size.width * 0.97,
margin: EdgeInsets.only(top: 10, bottom: 10),
padding: EdgeInsets.only(top: 10, left: 20, right: 20),
decoration: BoxDecoration(
color: Color(0xff0A213D),
borderRadius:
BorderRadius.vertical(bottom: Radius.circular(3))),
child: ExpansionTile(
title: Column(children: < Widget > [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: < Widget > [
Container(
margin: EdgeInsets.only(top: 15),
child:
Text("Obiectiv numarul 1", style: TextStyle(fontSize: 22, color: Colors.white), ), ),
IconButton(
iconSize: 35,
color: Color(0xff6c7a8b),
icon: Icon(Icons.create_outlined),
onPressed: () {
},
),
], ),
Align(
alignment: Alignment.centerRight,
child: Text('5 dec 2020', style: TextStyle(fontSize: 15, color: Color(0xffdadada)), )),
Container(
margin: EdgeInsets.only(top: 10, bottom: 10),
color: Colors.white,
child: StepProgressIndicator(
totalSteps: 5,
currentStep: 2,
size: 6,
selectedColor: Color(0xff2f80ed),
unselectedColor: Colors.grey,
)
),
Align(
alignment: Alignment.centerRight,
child: IconButton(
iconSize: 45,
color: Color(0xff2f80ed),
icon: Icon(Icons.keyboard_arrow_down_outlined),
onPressed: () {
},
)),
], ),
children: < Widget > [
Text('expanded text')
],
)
)
【问题讨论】: