【问题标题】:How to put icon center of another icon in flutter如何将另一个图标的图标中心放在颤动中
【发布时间】:2020-06-13 08:29:24
【问题描述】:

如何将一个图标放在另一个图标的中心,如下面的谷歌地图标记?

【问题讨论】:

    标签: flutter icons material-design


    【解决方案1】:

    您应该使用“堆栈”控件,其中您必须使用“Pin”添加第一个图标,并使用“Carry”添加另一个图标

        Widget getStack() {
      return Stack(
        children: <Widget>[
          Center(
            child: Icon(Icons.account_balance),
          ),
          Center(
            child: Icon(Icons.account_balance),
          )
        ],
      );
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-06
      • 2020-08-03
      • 1970-01-01
      • 1970-01-01
      • 2021-09-14
      相关资源
      最近更新 更多