Reputation: 2613
I was wondering if there is a way in which I can remove splash and highlight from PopupMenuButton a bit like with other buttons.
new PopupMenuButton({
...
splashColor: Colors.transparent,
highlightColor: Colors.transparent, // makes highlight invisible too
})
Upvotes: 1
Views: 4145
Reputation: 1
You can use these properties should be fine:
PopupMenuButton(
padding: EdgeInsets.zero,
style: ButtonStyle(
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
padding: WidgetStatePropertyAll(EdgeInsets.zero),
visualDensity: VisualDensity.compact,
),
Upvotes: 0
Reputation: 1458
Put splashFactory
with NoSplash.splashFactory
Theme(
data: Theme.of(context).copyWith(
splashFactory: NoSplash.splashFactory,
),
child: PopupMenuButton(...),
)
Upvotes: 1