Want to add DropdownButton overflow in ListView in Flutter? The easiest solution is to add the isExpanded property to true in DropdownButton
For example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | new DropdownButton( isExpanded: true, //Adding this property, does the magic items: [ new DropdownMenuItem( child: Text("Some large text that needs to be wrapped or ellipsized", overflow: TextOverflow.ellipsis), ), new DropdownMenuItem( child: Text("This is another large text that needs to be wrapped or ellipsized", overflow: TextOverflow.ellipsis), ), new DropdownMenuItem( child: Text("And one more large text that needs to be wrapped or ellipsized", overflow: TextOverflow.ellipsis), ) ], onChanged: (val) { //print(val); }), |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.