小编于阔源*_*于阔源的帖子

如何更改 Popup MenuButton 项目符号窗口的背景颜色?

我想更改弹出菜单按钮窗口的背景颜色。我该怎么办?我希望我能得到你的帮助。谢谢。当我改变容器的颜色时,有些角落不能改变颜色。

 new IconButton(
            icon: new Icon(
              Icons.search,
              color: Colors.white,
            ),
            onPressed: () {},
          ),
          new PopupMenuButton(
            offset: const Offset(0.0, 60.0),
            icon: new Icon(Icons.add, color: Colors.white),
            itemBuilder: (BuildContext context) => <PopupMenuItem<String>>[
                  new PopupMenuItem<String>(
                      value: '?????',
                      child: new Container(
                          color: Colors.red,
                          child: new Column(
                            children: <Widget>[
                              new Row(
                                children: <Widget>[
                                  new Image.asset(defaultAvatar,
                                      width: 30.0, height: 30.0),
                                  new Text('????')
                                ],
                              ),
                            ],
                          ))),
                  new PopupMenuItem<String>(
                      value: '?????',
                      child: new Container(
                          child: new Column(
                        children: <Widget>[
                          new Row(
                            children: <Widget>[
                              new Image.asset(defaultAvatar,
                                  width: 30.0, …
Run Code Online (Sandbox Code Playgroud)

flutter flutter-layout

4
推荐指数
2
解决办法
5025
查看次数

标签 统计

flutter ×1

flutter-layout ×1