📜  如何在颤振中添加弹出菜单按钮 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:00.097000             🧑  作者: Mango

代码示例3
//with tooltip and round border corner(if you also needed those)
actions: [
          PopupMenuButton(
            tooltip: "",                           //Adding tooltip
            shape: RoundedRectangleBorder(         //Adding Round Border
              borderRadius: BorderRadius.all(
                Radius.circular(20.0),
              ),
            ),
            itemBuilder: (context) => [
              PopupMenuItem(
                child: Text("Settings"),
                value: 1,
              ),
              PopupMenuDivider(                    //Adding Divider
                height: 0, 
              ),
              PopupMenuItem(
                child: Text("FAQ"),
                value: 2,
              ),
              PopupMenuDivider(                    //Adding Divider
                height: 0,
              ),
              PopupMenuItem(
                child: Text("Contact Us"),
                value: 2,
              ),
            ],
          ),
          SizedBox(width: 10),
        ],