这是因为在Dialog内部使用了:
ConstrainedBox(
constraints: const BoxConstraints(minWidth: 280.0),
来指定最小宽度,所以如果想要自定义宽度,应该使用UnconstrainedBox来包括自定义的元素。
这是因为在Dialog内部使用了:
ConstrainedBox(
constraints: const BoxConstraints(minWidth: 280.0),
来指定最小宽度,所以如果想要自定义宽度,应该使用UnconstrainedBox来包括自定义的元素。
本文标题:Flutter showDialog无法指定宽度
本文链接:https://www.haomeiwen.com/subject/anbglrtx.html
网友评论