简体   繁体   English

如何将另一个图标的图标中心置于颤动中

[英]How to put icon center of another icon in flutter

How to Put one icon in center of another icon like google map marker like below?如何将一个图标放在另一个图标的中心,如谷歌地图标记,如下所示?

在此处输入图片说明

You should use "Stack" control in which you have to add the first icon with "Pin" and same add another with "Carry"您应该使用“堆栈”控件,您必须在其中添加带有“Pin”的第一个图标,并使用“Carry”添加另一个图标

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM