Flutter menuBar:如何去除背景/边框?
MenuBar(children: [
MenuItemButton(child: Text('Login')),
MenuItemButton(child: Text('Register')),
])
--------------------
| Login Register |
--------------------
如何去除背景(透明)和边框?
Login Register
您可以使用
style
属性和 MenuStyle
类(https://api.flutter.dev/flutter/material/MenuStyle-class.html):
MenuBar(
style: MenuStyle(
backgroundColor: Colors.transparent
),
children: ...,
),