【问题标题】:Flutter modal bottom sheet the little black thingFlutter modal 底片小黑东西
【发布时间】:2022-10-24 14:54:56
【问题描述】:

我的问题可能听起来有点不对劲,但如何制作这个东西?我不知道什么叫对不起

【问题讨论】:

    标签: flutter modal-dialog flutter-showmodalbottomsheet


    【解决方案1】:

    它是一个小部件或小部件的组合。您可以使用下面的代码,然后将其定位在该点

    SizedBox(
    width 40,
    child: Divider(height: 3, thickness: 3,color: Colors.grey),
    ),
    

    这是我能想到的最快的解决方案。 或者,您可以使用排()然后寻找这样的线条图标并将其作为孩子。当然将crossAxis设置为中心

    【讨论】:

      【解决方案2】:

      我想我们可以称之为“锚点”吗?

      创建具有良好边界半径的代码:

              Padding(
              padding: const EdgeInsets.only(top: 5),
              child: Container(
                height: 5,
                width: 80,
                decoration:
                    BoxDecoration(color: Colors.grey[300], borderRadius: const BorderRadius.all(Radius.circular(8))),
              ))
      

      【讨论】:

        猜你喜欢
        • 2021-01-10
        • 2020-06-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-11-21
        • 2020-05-17
        • 1970-01-01
        相关资源
        最近更新 更多