Reputation: 376
I'm making a flutter app in which I use an AlertDialog widget Here is a screen in which you can understand where the problem is :
Here is a piece of my code used for that
showDialog(
context: context,
builder: (BuildContext context) {
// return object of type Dialog
return AlertDialog(
title: Text('Ajouter un ingrédient'),
content: new Column(
children: <Widget>[
Container(
child: DropDownButtonIngredients(),
),
Container(
child: new TextField(
autofocus: false,
decoration: new InputDecoration(
labelText: 'Nom', hintText: 'Frite, Steak, Salade ...'),
onChanged: (value) {
newIngr = value;
},
)),
],
),
actions: <Widget>[
FlatButton(
child: Text('Ok'),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
},
);
}
Note : I already tried to remove the DropDownButtonIngredients container, nothing new, same for the other container
Upvotes: 0
Views: 126
Reputation: 277717
Set mainAxisSize
to MainAxisSize.min
:
Column(
mainAxisSize: MainAxisSize.min,
...
);
Upvotes: 1