I want to position the menu of PopupMenuButton to the side of my app, but it always leaves a gap of about 10 logical pixels with the side:

I already tried to give the offset property a negative dx value, but that does not seem to do anything. As far as I know there are no other properties on PopupMenuButton that change the position of the menu.
How can the menu be positioned exactly at the side? Am I missing something obvious here?
BTW: the PopupMenuButton is located in the AppBar of a Scaffold.
This is my code for my PopupMenuButton:
PopupMenuButton( color: cardBackground, elevation: 0.0, shape: RoundedRectangleBorder( side: BorderSide( width: 0.5, color: cardText, )), padding: EdgeInsets.all(0.0), offset: Offset(-10.0, kToolbarHeight), onSelected: (value) => doPaletteAction(value), itemBuilder: (BuildContext context) => createPopUpItems(), icon: Icon( Icons.format_list_bulleted_rounded, color: appBarIconButtons, ) ) https://stackoverflow.com/questions/65782630/popupmenubutton-menu-always-has-a-gap-to-the-side-of-the-screen January 19, 2021 at 06:00AM
没有评论:
发表评论