Flutter: How to place the AlertDialog's actions at the top of its body?

Issue

Normally the AlertDialog‘s actions are placed at the bottom of the dialog. I wonder if it would be possible to place them not at the bottom but at the top. I’ve read the documentation:

enter image description hereand it seems this it not possible using actions. Maybe I’m wrong. I’d rather not have to place the actions in the AlertDialog‘s title as a workaround. One could also place everything inside a Container and then just simply handle the widgets inside it, but I’m wondering if there’s something that could be achieved less manually. I’d thank you any other approach you would like to share.

Here is an image to show what could be a desired result:

enter image description here

Solution

I think the only way to achieve this is, as you said, using a Container and add whatever you need for the AlertDialog to look as you want.

Answered By – Jérémy

Answer Checked By – Timothy Miller (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *