我看过有关如何使用 Flutter Stack 小部件的教程,但我没有看到它们OverFlow在他们的代码中使用,但是当我开始编写我的代码时,顶部对象会剪辑或隐藏在底部对象内,除非我OverFlow.visible在它们离开彼此之前使用,请问这个问题的过程是什么?
1 回答
0
Stack小部件默认为Overflow.clip. 如果你想要不同的行为,你可以改变它。
来自文档:
执行
Stack({ Key key, this.alignment = AlignmentDirectional.topStart, this.textDirection, this.fit = StackFit.loose, this.overflow = Overflow.clip, List<Widget> children = const <Widget>[], }) : super(key: key, children: children);
于 2020-01-18T01:25:01.623 回答