单击加号按钮时会振颤动态框

问题描述 投票:0回答:1

我正在尝试连续制作两个盒子,当我单击第一个盒子时,我的任务便会打开,时钟将打开,用户选择需要时间。因此时钟不是大问题,但盒子是动态的。

就像在2个框上​​方有一个日历,所以当我单击“星期一”时,我将在多个框中添加多个时间,然后在单击“星期二”后,再次出现新框,然后我们将选择另一个时间。因此,在每周的每一天中,我们都需要动态框。就像如果我们单击加号图标,则框将增加。

enter image description here

android flutter flutter-layout
1个回答
0
投票

没有看到您的代码,我不能100%地确定这正是您想要的,但是如果它不完美,您应该可以采用,应该能够采用并使其符合您的需求。

Column(
        children: <Widget>[
          ListView.builder(
            shrinkWrap: true,
            itemCount: items.length,
            itemBuilder: (context, index) => Text(items[index]),
          ),
          Row(
            children: <Widget>[
              Container(
                width: 300,
                child: TextField(
                  controller: _controller,
                  onSubmitted: (String value) {
                    setState(() {
                      items.add(value);//this would go in your button
                    });
                    _controller.clear();
                  },
                ),
              ),
            ],
          )
        ],
      ),
© www.soinside.com 2019 - 2024. All rights reserved.