我想知道是否有一种方法可以像其他按钮一样从 PopupMenuButton 中删除飞溅和突出显示。
new PopupMenuButton({
...
splashColor: Colors.transparent,
highlightColor: Colors.transparent, // makes highlight invisible too
})
Run Code Online (Sandbox Code Playgroud)
主题将主题应用于后代小部件。
Theme(
data: Theme.of(context).copyWith(
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
),
child: PopupMenuButton(...),
)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3152 次 |
| 最近记录: |