i have try to create a popup menu button but i want to reposition the menu.
this is the code i've tried :
PopupMenuButton(itemBuilder: (context)=>[
PopupMenuItem(child: Text("Grup Baru")),
PopupMenuItem(child: Text("Siaran Baru")),
PopupMenuItem(child: Text("Perangkat Tertaut")),
PopupMenuItem(child: Text("Pesan Berbintang")),
])
and here's the result for default :
and i want to reposition it,
to this :
is there any suggest that i can try?
Add position: PopupMenuPosition.under,
inside PopupMenuButton
widget.
Refer position and PopupMenuPosition
under: Menu is positioned under the anchor.
Full widget:
PopupMenuButton(
position: PopupMenuPosition.under,
itemBuilder: (context) => [
PopupMenuItem(child: Text("Grup Baru")),
PopupMenuItem(child: Text("Siaran Baru")),
PopupMenuItem(child: Text("Perangkat Tertaut")),
PopupMenuItem(child: Text("Pesan Berbintang")),
],
),